From 7007c8d48ec665d67c60d549dac09f3bb6d5bfe9 Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Thu, 21 Aug 2014 19:18:22 -0300 Subject: [PATCH] Small chat fix --- public/javascripts/chat.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/javascripts/chat.js b/public/javascripts/chat.js index c0b1f8d..008decb 100644 --- a/public/javascripts/chat.js +++ b/public/javascripts/chat.js @@ -317,6 +317,10 @@ jQuery(function($) { else { // why server sends presence from myself to me? log('ignoring presence from myself'); + if(presence.show=='offline') { + console.log(Jabber.presence_status); + Jabber.send_availability_status(Jabber.presence_status); + } } } } @@ -585,7 +589,7 @@ jQuery(function($) { var domain = '127.0.0.1'; if(from['id']==getCurrentIdentifier()) { - Jabber.show_message(to['id']+'@'+group+domain, $own_name, body, 'self', to['id'], date); + Jabber.show_message(to['id']+'@'+group+domain, $own_name, body, 'self', from['id'], date); } else { var target = group!='' ? to['id'] : from['id'] Jabber.show_message(target+'@'+group+domain, from['name'], body, 'other', from['id'], date); -- libgit2 0.21.2