diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2016-02-03 12:12:10 -0500 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2016-02-04 11:38:58 -0500 |
commit | 70c3715b963cd8f2a710f8909f23696f9de7fcc7 (patch) | |
tree | 55077777c2bbb4e5d0f6f41d9e2d12e3668d02c4 /web/react/utils | |
parent | 994358c31a93296a225f7d34942bbedfeac025c4 (diff) | |
download | chat-70c3715b963cd8f2a710f8909f23696f9de7fcc7.tar.gz chat-70c3715b963cd8f2a710f8909f23696f9de7fcc7.tar.bz2 chat-70c3715b963cd8f2a710f8909f23696f9de7fcc7.zip |
Changed how posts are marked ephemeral
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; +} |