summaryrefslogtreecommitdiffstats
path: root/web/react/utils/utils.jsx
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2016-02-23 11:09:59 -0500
committerJoramWilander <jwawilander@gmail.com>2016-02-23 11:09:59 -0500
commit1f049af2b7ea41a5e1e79a8263e10fa58f186c8d (patch)
tree4a49aef95e886f10052b83319588f02ec75d830e /web/react/utils/utils.jsx
parentc16071afc5320677bc2c13fa4dff941152e18970 (diff)
downloadchat-1f049af2b7ea41a5e1e79a8263e10fa58f186c8d.tar.gz
chat-1f049af2b7ea41a5e1e79a8263e10fa58f186c8d.tar.bz2
chat-1f049af2b7ea41a5e1e79a8263e10fa58f186c8d.zip
Refactor listener out of user profile and fix thread logic
Diffstat (limited to 'web/react/utils/utils.jsx')
-rw-r--r--web/react/utils/utils.jsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index a4d2515e2..82828e34b 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -1417,3 +1417,7 @@ export function languages() {
export function isPostEphemeral(post) {
return post.type === Constants.POST_TYPE_EPHEMERAL || post.state === Constants.POST_DELETED;
}
+
+export function getRootId(post) {
+ return post.root_id === '' ? post.id : post.root_id;
+}