summaryrefslogtreecommitdiffstats
path: root/webapp/utils/async_client.jsx
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-08-19 12:09:08 -0400
committerGitHub <noreply@github.com>2016-08-19 12:09:08 -0400
commit388fefcc4316e5e16b82134802b29c046f0a4950 (patch)
tree4014192d94e11e884bc4ea324a181bdff0d6b303 /webapp/utils/async_client.jsx
parent06f5acf42cbd61e474bfc451ce539812383868a2 (diff)
downloadchat-388fefcc4316e5e16b82134802b29c046f0a4950.tar.gz
chat-388fefcc4316e5e16b82134802b29c046f0a4950.tar.bz2
chat-388fefcc4316e5e16b82134802b29c046f0a4950.zip
Fix the elusive missing posts bug (#3836)
Diffstat (limited to 'webapp/utils/async_client.jsx')
-rw-r--r--webapp/utils/async_client.jsx8
1 files changed, 2 insertions, 6 deletions
diff --git a/webapp/utils/async_client.jsx b/webapp/utils/async_client.jsx
index 55f43fd57..3941442b1 100644
--- a/webapp/utils/async_client.jsx
+++ b/webapp/utils/async_client.jsx
@@ -581,6 +581,7 @@ export function getPostsPage(id, maxPosts) {
id: channelId,
before: true,
numRequested: numPosts,
+ checkLatest: true,
post_list: data
});
@@ -616,12 +617,7 @@ export function getPosts(id) {
return;
}
- const latestPost = PostStore.getLatestPost(channelId);
- let latestPostTime = 0;
-
- if (latestPost != null && latestPost.update_at != null) {
- latestPostTime = latestPost.create_at;
- }
+ const latestPostTime = PostStore.getLatestPostFromPageTime(id);
callTracker['getPosts_' + channelId] = utils.getTimestamp();