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
This commit is contained in:
parent
5f42023f97
commit
5fd7ed5b14
@ -176,6 +176,7 @@ function jabber_format_entry($profile, $notice)
|
|||||||
$xs = new XMLStringer();
|
$xs = new XMLStringer();
|
||||||
$xs->elementStart('html', array('xmlns' => 'http://jabber.org/protocol/xhtml-im'));
|
$xs->elementStart('html', array('xmlns' => 'http://jabber.org/protocol/xhtml-im'));
|
||||||
$xs->elementStart('body', array('xmlns' => 'http://www.w3.org/1999/xhtml'));
|
$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),
|
$xs->element('a', array('href' => $profile->profileurl),
|
||||||
$profile->nickname);
|
$profile->nickname);
|
||||||
$xs->text(": ");
|
$xs->text(": ");
|
||||||
@ -184,6 +185,11 @@ function jabber_format_entry($profile, $notice)
|
|||||||
} else {
|
} else {
|
||||||
$xs->raw(common_render_content($notice->content, $notice));
|
$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('body');
|
||||||
$xs->elementEnd('html');
|
$xs->elementEnd('html');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user