diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-05-18 11:15:17 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-05-18 11:15:17 -0400 |
commit | 02576f3d597b3c419df20f2a50aa6e587f1d98bb (patch) | |
tree | 548853238f55f311702889e7ac56d7b102099a03 /webapp/stores/post_store.jsx | |
parent | d48be63513ec083c3073df5b7c50525d18bf0181 (diff) | |
download | chat-02576f3d597b3c419df20f2a50aa6e587f1d98bb.tar.gz chat-02576f3d597b3c419df20f2a50aa6e587f1d98bb.tar.bz2 chat-02576f3d597b3c419df20f2a50aa6e587f1d98bb.zip |
PLT-1909 Fixed error rendering pending posts (#3041)
* Fixed error caused by checking if a post is a system message
* Fixed trying to edit system posts when using the up arrow hotkey
Diffstat (limited to 'webapp/stores/post_store.jsx')
-rw-r--r-- | webapp/stores/post_store.jsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/webapp/stores/post_store.jsx b/webapp/stores/post_store.jsx index 17529acb6..7a532fa2e 100644 --- a/webapp/stores/post_store.jsx +++ b/webapp/stores/post_store.jsx @@ -454,10 +454,11 @@ class PostStoreClass extends EventEmitter { for (let i = 0; i < len; i++) { const post = postList.posts[postList.order[i]]; - // don't edit webhook posts or deleted posts + // don't edit webhook posts, deleted posts, or system messages if (post.user_id !== userId || (post.props && post.props.from_webhook) || - post.state === Constants.POST_DELETED) { + post.state === Constants.POST_DELETED || + (post.type && post.type.startsWith(Constants.SYSTEM_MESSAGE_PREFIX))) { continue; } |