From 42ffe0ee30a4814c904aed89ca14d2c380d36457 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 11 Sep 2018 17:57:15 +0200 Subject: [PATCH] Fix initial history rules --- www/contacts/messenger-ui.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/contacts/messenger-ui.js b/www/contacts/messenger-ui.js index 69675b3e5..2be3c6f34 100644 --- a/www/contacts/messenger-ui.js +++ b/www/contacts/messenger-ui.js @@ -153,6 +153,7 @@ define([ var markup = {}; markup.message = function (msg) { + if (msg.type !== 'MSG') { return; } var curvePublic = msg.author; var name = msg.name || contactsData[msg.author].displayName; var d = msg.time ? new Date(msg.time) : undefined; @@ -413,7 +414,7 @@ define([ $messages.find('div.cp-app-contacts-chat[data-key]').hide(); if ($chat.length) { var $chat_messages = $chat.find('div.cp-app-contacts-message'); - if (!$chat_messages.length || channel.needMoreHistory) { + if ($chat_messages.length < 10) { //|| channel.needMoreHistory) { XXX delete channel.needMoreHistory; var $more = $chat.find('.cp-app-contacts-more-history'); $more.click();