From f0c614147ff5475af1067630ec5f5fca273a7026 Mon Sep 17 00:00:00 2001 From: Florian Orben Date: Wed, 28 Oct 2015 22:28:10 +0100 Subject: Dont edit reply messages of outgoing webhooks by pressing up-arrow in chat input box --- web/react/stores/post_store.jsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'web') diff --git a/web/react/stores/post_store.jsx b/web/react/stores/post_store.jsx index a58fdde3a..8f4e30e7c 100644 --- a/web/react/stores/post_store.jsx +++ b/web/react/stores/post_store.jsx @@ -172,14 +172,15 @@ class PostStoreClass extends EventEmitter { var lastPost = null; for (i; i < len; i++) { - if (postList.posts[postList.order[i]].user_id === userId) { + let post = postList.posts[postList.order[i]]; + if (post.user_id === userId && (post.props && !post.props.from_webhook || !post.props)) { if (rootId) { - if (postList.posts[postList.order[i]].root_id === rootId || postList.posts[postList.order[i]].id === rootId) { - lastPost = postList.posts[postList.order[i]]; + if (post.root_id === rootId || post.id === rootId) { + lastPost = post; break; } } else { - lastPost = postList.posts[postList.order[i]]; + lastPost = post; break; } } -- cgit v1.2.3-1-g7c22