From 1f049af2b7ea41a5e1e79a8263e10fa58f186c8d Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Tue, 23 Feb 2016 11:09:59 -0500 Subject: Refactor listener out of user profile and fix thread logic --- web/react/utils/utils.jsx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'web/react/utils/utils.jsx') 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; +} -- cgit v1.2.3-1-g7c22