summaryrefslogtreecommitdiffstats
path: root/web/react/utils/async_client.jsx
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2016-02-11 09:22:57 -0500
committerJoramWilander <jwawilander@gmail.com>2016-02-11 09:22:57 -0500
commitcac086ae22c1525f12c1e8d28393b894aa34fd1e (patch)
treea40f1856187f1f90d3735a8205d1b4c23eafe296 /web/react/utils/async_client.jsx
parenta15f8c582dd5c9371cce20e572d0552970afbadd (diff)
downloadchat-cac086ae22c1525f12c1e8d28393b894aa34fd1e.tar.gz
chat-cac086ae22c1525f12c1e8d28393b894aa34fd1e.tar.bz2
chat-cac086ae22c1525f12c1e8d28393b894aa34fd1e.zip
Fixing the elusive missing post bug
Diffstat (limited to 'web/react/utils/async_client.jsx')
-rw-r--r--web/react/utils/async_client.jsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/react/utils/async_client.jsx b/web/react/utils/async_client.jsx
index c8676f45d..c2b5fe9e5 100644
--- a/web/react/utils/async_client.jsx
+++ b/web/react/utils/async_client.jsx
@@ -521,18 +521,18 @@ export function getPosts(id) {
return;
}
- if (PostStore.getAllPosts(channelId) == null) {
+ if ($.isEmptyObject(PostStore.getAllPosts(channelId))) {
getPostsPage(channelId, Constants.POST_CHUNK_SIZE);
return;
}
- const latestUpdate = PostStore.getLatestUpdate(channelId);
+ const latestPost = PostStore.getLatestPost(channelId);
callTracker['getPosts_' + channelId] = utils.getTimestamp();
client.getPosts(
channelId,
- latestUpdate,
+ latestPost.update_at,
(data, textStatus, xhr) => {
if (xhr.status === 304 || !data) {
return;