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
Этот коммит содержится в:
Joram Wilander
2015-10-29 07:54:44 -04:00
родитель 82abf9063f f0c614147f
Коммит b58251df7b

Просмотреть файл

@@ -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;
}
}