Commit 7007c8d48ec665d67c60d549dac09f3bb6d5bfe9
Committed by
Rodrigo Souto
1 parent
024c2e05
Exists in
master
and in
29 other branches
Small chat fix
Showing
1 changed file
with
5 additions
and
1 deletions
Show diff stats
public/javascripts/chat.js
@@ -317,6 +317,10 @@ jQuery(function($) { | @@ -317,6 +317,10 @@ jQuery(function($) { | ||
317 | else { | 317 | else { |
318 | // why server sends presence from myself to me? | 318 | // why server sends presence from myself to me? |
319 | log('ignoring presence from myself'); | 319 | log('ignoring presence from myself'); |
320 | + if(presence.show=='offline') { | ||
321 | + console.log(Jabber.presence_status); | ||
322 | + Jabber.send_availability_status(Jabber.presence_status); | ||
323 | + } | ||
320 | } | 324 | } |
321 | } | 325 | } |
322 | } | 326 | } |
@@ -585,7 +589,7 @@ jQuery(function($) { | @@ -585,7 +589,7 @@ jQuery(function($) { | ||
585 | var domain = '127.0.0.1'; | 589 | var domain = '127.0.0.1'; |
586 | 590 | ||
587 | if(from['id']==getCurrentIdentifier()) { | 591 | if(from['id']==getCurrentIdentifier()) { |
588 | - Jabber.show_message(to['id']+'@'+group+domain, $own_name, body, 'self', to['id'], date); | 592 | + Jabber.show_message(to['id']+'@'+group+domain, $own_name, body, 'self', from['id'], date); |
589 | } else { | 593 | } else { |
590 | var target = group!='' ? to['id'] : from['id'] | 594 | var target = group!='' ? to['id'] : from['id'] |
591 | Jabber.show_message(target+'@'+group+domain, from['name'], body, 'other', from['id'], date); | 595 | Jabber.show_message(target+'@'+group+domain, from['name'], body, 'other', from['id'], date); |