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
Этот коммит содержится в:
Harrison Healey
2016-05-18 11:15:17 -04:00
коммит произвёл Christopher Speller
родитель d48be63513
Коммит 02576f3d59
4 изменённых файлов: 6 добавлений и 5 удалений

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

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