summaryrefslogtreecommitdiffstats
path: root/webapp/utils
diff options
context:
space:
mode:
authorDebanshu Kundu <debanshu.kundu@joshtechnologygroup.com>2016-12-19 19:35:39 +0530
committerHarrison Healey <harrisonmhealey@gmail.com>2016-12-19 09:05:39 -0500
commit6a5cdd5cdf09317ce259dd146fc4f1cb76d8b9b6 (patch)
treee5d01a5d3eae57c74ca0f4145a3e0e1b14b746d6 /webapp/utils
parent999d1553e1ce45adf58f6082b160bc1147dc592b (diff)
downloadchat-6a5cdd5cdf09317ce259dd146fc4f1cb76d8b9b6.tar.gz
chat-6a5cdd5cdf09317ce259dd146fc4f1cb76d8b9b6.tar.bz2
chat-6a5cdd5cdf09317ce259dd146fc4f1cb76d8b9b6.zip
PLT-135 Showing "(Edited)" indicator if a message has been edited. (#4764)
Diffstat (limited to 'webapp/utils')
-rw-r--r--webapp/utils/post_utils.jsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/webapp/utils/post_utils.jsx b/webapp/utils/post_utils.jsx
index 4bba784cb..d909b35f8 100644
--- a/webapp/utils/post_utils.jsx
+++ b/webapp/utils/post_utils.jsx
@@ -15,6 +15,10 @@ export function isComment(post) {
return false;
}
+export function isEdited(post) {
+ return post.update_at && post.update_at > post.create_at;
+}
+
export function getProfilePicSrcForPost(post, timestamp) {
let src = Client.getUsersRoute() + '/' + post.user_id + '/image?time=' + timestamp;
if (post.props && post.props.from_webhook && global.window.mm_config.EnablePostIconOverride === 'true') {
@@ -28,4 +32,4 @@ export function getProfilePicSrcForPost(post, timestamp) {
}
return src;
-} \ No newline at end of file
+}