From c993a4549bf96459ee0d7b7b471721d202474e65 Mon Sep 17 00:00:00 2001 From: "ARDA\\Aaron" Date: Tue, 9 Jul 2019 13:10:59 -0500 Subject: [PATCH 1/2] Fix to sender selection on mesage load --- assets/js/yiiSimpleChat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/yiiSimpleChat.js b/assets/js/yiiSimpleChat.js index c5d17ed..fb6ac74 100644 --- a/assets/js/yiiSimpleChat.js +++ b/assets/js/yiiSimpleChat.js @@ -357,7 +357,7 @@ key: data['keys'][index], index: index, user: options.user, - sender: data['models'][index]['sender_id'] == options.user.id ? options.user : options.contact, + sender: data['models'][index]['senderId'] == options.user.id ? options.user : options.contact, settings: options.settings }; // append the message From 0755b2dc38afd3b70579850b9300e6b3400a2604 Mon Sep 17 00:00:00 2001 From: "ARDA\\Aaron" Date: Fri, 22 Nov 2019 16:21:31 -0600 Subject: [PATCH 2/2] Onley pusher mesages --- assets/js/yiiSimpleChat.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/js/yiiSimpleChat.js b/assets/js/yiiSimpleChat.js index fb6ac74..7bcfdc0 100644 --- a/assets/js/yiiSimpleChat.js +++ b/assets/js/yiiSimpleChat.js @@ -393,14 +393,14 @@ }); // load new messages every 10 seconds - setInterval(function () { - self.messenger.yiiSimpleChatMessages('load', 'new'); - }, 10000); + // setInterval(function () { + // self.messenger.yiiSimpleChatMessages('load', 'new'); + // }, 10000); // load new conversations every 15 seconds - setInterval(function () { - self.conversations.yiiSimpleChatConversations('load', 'new'); - }, 15000); + // setInterval(function () { + // self.conversations.yiiSimpleChatConversations('load', 'new'); + // }, 15000); }); } };