PLT-3105 Fixed bugs with FileInfos migration, including duplicate FileInfos being saved (#4134)

* Added a limit to GetByPath for the rare cases when two old files had the same path

* Fixed files still being displayed for deleted posts

* Added a lock to prevent migrateFilenamesToFileInfos from migrating multiple posts at once
Этот коммит содержится в:
Harrison Healey
2016-10-06 16:44:41 -04:00
коммит произвёл enahum
родитель c9793a566a
Коммит 7fb818d4ce
5 изменённых файлов: 57 добавлений и 11 удалений

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

@@ -318,7 +318,7 @@ class PostStoreClass extends EventEmitter {
// make sure to copy the post so that component state changes work properly
postList.posts[post.id] = Object.assign({}, post, {
state: Constants.POST_DELETED,
fileIds: []
file_ids: []
});
}
}

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

@@ -722,6 +722,7 @@ export function getFileInfosForPost(channelId, postId) {
return;
}
callTracker[callName] = utils.getTimestamp();
Client.getFileInfosForPost(
channelId,
postId,