diff options
author | Craig Andrews <candrews@integralblue.com> | 2009-10-27 23:31:49 -0400 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2009-10-27 23:31:49 -0400 |
commit | 5fd7ed5b149ba74d9f5044f1d5d18f7adf48ff78 (patch) | |
tree | 6823dbaa48fdcb47c360ff1be34a03c10678b619 | |
parent | 5f42023f97fca2c3b5fbd0da2d5e333e4cc2f109 (diff) |
Display user avatar in the XMPP message
Include notice id and conversation link the XMPP message
Thanks to Deepspawn for this idea and initial code
-rw-r--r-- | lib/jabber.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/jabber.php b/lib/jabber.php index 3dcdce5db..73f2ec660 100644 --- a/lib/jabber.php +++ b/lib/jabber.php @@ -176,6 +176,7 @@ function jabber_format_entry($profile, $notice) $xs = new XMLStringer(); $xs->elementStart('html', array('xmlns' => 'http://jabber.org/protocol/xhtml-im')); $xs->elementStart('body', array('xmlns' => 'http://www.w3.org/1999/xhtml')); + $xs->element("img", array('src'=> $profile->avatarUrl(AVATAR_MINI_SIZE) , 'alt' => $profile->nickname)); $xs->element('a', array('href' => $profile->profileurl), $profile->nickname); $xs->text(": "); @@ -184,6 +185,11 @@ function jabber_format_entry($profile, $notice) } else { $xs->raw(common_render_content($notice->content, $notice)); } + $xs->raw(" "); + $xs->element('a', array( + 'href'=>common_local_url('conversation', + array('id' => $notice->conversation)).'#notice-'.$notice->id + ),sprintf(_('notice id: %s'),$notice->id)); $xs->elementEnd('body'); $xs->elementEnd('html'); |