summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2015-10-29 07:54:44 -0400
committerJoram Wilander <jwawilander@gmail.com>2015-10-29 07:54:44 -0400
commitb58251df7bbc02318fe498ffc850d726a61ffdcb (patch)
tree0511bd7749fd62f797058151c953517e1c848b78 /web
parent82abf9063fe9ae9983a8aec6ecb49a8fe1a4ba98 (diff)
parentf0c614147ff5475af1067630ec5f5fca273a7026 (diff)
downloadchat-b58251df7bbc02318fe498ffc850d726a61ffdcb.tar.gz
chat-b58251df7bbc02318fe498ffc850d726a61ffdcb.tar.bz2
chat-b58251df7bbc02318fe498ffc850d726a61ffdcb.zip
Merge pull request #1221 from florianorben/disallow_edit_bot_msg_arrow_up
Dont edit reply messages of outgoing webhooks by pressing up-arrow in chat input box
Diffstat (limited to 'web')
-rw-r--r--web/react/stores/post_store.jsx9
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;
}
}