diff options
author | Florian Orben <florian.orben@gmail.com> | 2015-10-28 22:28:10 +0100 |
---|---|---|
committer | Florian Orben <florian.orben@gmail.com> | 2015-10-28 22:28:10 +0100 |
commit | f0c614147ff5475af1067630ec5f5fca273a7026 (patch) | |
tree | 84513ecd1e852eb95acff0cf2ca7021622b4e37d /web/react/stores | |
parent | ccf9e0cabd9fcede118ca54b24adb33c788a7ae9 (diff) | |
download | chat-f0c614147ff5475af1067630ec5f5fca273a7026.tar.gz chat-f0c614147ff5475af1067630ec5f5fca273a7026.tar.bz2 chat-f0c614147ff5475af1067630ec5f5fca273a7026.zip |
Dont edit reply messages of outgoing webhooks by pressing up-arrow in chat input box
Diffstat (limited to 'web/react/stores')
-rw-r--r-- | web/react/stores/post_store.jsx | 9 |
1 files changed, 5 insertions, 4 deletions
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; } } |