diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-07-18 02:31:30 -0400 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-07-18 02:31:30 -0400 |
commit | 5f55c96157811ee22400824d91f28d33bec0e218 (patch) | |
tree | c1cadc98e58766e70a60713f53f9d99da1083fa2 /lib/jabber.php | |
parent | 44dccacb1c9345a3bb22286880ec6df3d6fd3158 (diff) |
add an HTML payload to outgoing notices
darcs-hash:20080718063130-84dde-01cc0d9d9cf92e5ad9f5c079c771e2ea64c8d5f2.gz
Diffstat (limited to 'lib/jabber.php')
-rw-r--r-- | lib/jabber.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/jabber.php b/lib/jabber.php index 1e609377f..77bc316dd 100644 --- a/lib/jabber.php +++ b/lib/jabber.php @@ -117,6 +117,7 @@ function jabber_send_notice($to, $notice) { # Extra stuff defined by Twitter, needed by twitter clients function jabber_format_entry($profile, $notice) { + $noticeurl = common_local_url('shownotice', array('notice' => $notice->id)); $msg = jabber_format_notice($profile, $notice); @@ -135,6 +136,12 @@ function jabber_format_entry($profile, $notice) { $entry .= "<published>".common_date_w3dtf($notice->created)."</published>\n"; $entry .= "<updated>".common_date_w3dtf($notice->modified)."</updated>\n"; $entry .= "</entry>\n"; + + $html = "\n<html xmlns='http://jabber.org/protocol/xhtml-im'>\n"; + $html .= "<body xmlns='http://www.w3.org/1999/xhtml'>\n"; + $html .= ($notice->rendered) ? $notice->rendered : common_render_content($notice->content, $notice); + $html .= "\n</body>\n"; + $html .= "\n</html>\n"; $event = "<event xmlns='http://jabber.org/protocol/pubsub#event'>\n"; $event .= "<items xmlns='http://jabber.org/protocol/pubsub' "; @@ -143,7 +150,7 @@ function jabber_format_entry($profile, $notice) { $event .= "</items>\n"; $event .= "</event>\n"; # FIXME: include the pubsub event, too. - return $entry; + return $html . $entry; # return $entry . "\n" . $event; } |