diff options
Diffstat (limited to 'web/react/utils')
-rw-r--r-- | web/react/utils/constants.jsx | 2 | ||||
-rw-r--r-- | web/react/utils/utils.jsx | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx index cfb33a79c..c1bd41b88 100644 --- a/web/react/utils/constants.jsx +++ b/web/react/utils/constants.jsx @@ -128,8 +128,8 @@ export default { POST_LOADING: 'loading', POST_FAILED: 'failed', POST_DELETED: 'deleted', - POST_TYPE_JOIN_LEAVE: 'system_join_leave', POST_TYPE_EPHEMERAL: 'system_ephemeral', + POST_TYPE_JOIN_LEAVE: 'system_join_leave', SYSTEM_MESSAGE_PREFIX: 'system_', SYSTEM_MESSAGE_PROFILE_NAME: 'System', SYSTEM_MESSAGE_PROFILE_IMAGE: '/static/images/logo_compact.png', diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 494c38bdb..e8cfc82bc 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -1355,3 +1355,7 @@ export function languages() { ] ); } + +export function isPostEphemeral(post) { + return post.type === Constants.POST_TYPE_EPHEMERAL || post.state === Constants.POST_DELETED; +} |