Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 345242 Details for
Bug 465548
net-im/pidgin-2.10.7-r1 - patch that display subjects for messages on XMPP
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
jabber subject line patch
jabber_subject_line_patch_v2.diff (text/plain), 2.72 KB, created by
Mikhail Kurinnoi
on 2013-04-11 16:52:04 UTC
(
hide
)
Description:
jabber subject line patch
Filename:
MIME Type:
Creator:
Mikhail Kurinnoi
Created:
2013-04-11 16:52:04 UTC
Size:
2.72 KB
patch
obsolete
>--- libpurple/protocols/jabber/message.c.orig >+++ libpurple/protocols/jabber/message.c >@@ -64,7 +64,8 @@ > PurpleAccount *account; > JabberBuddy *jb; > JabberBuddyResource *jbr; >- >+ char * msgbody; >+ > if(!jid) > return; > >@@ -115,6 +116,7 @@ > serv_got_typing_stopped(gc, jm->from); > } > } else { >+ > if (jid->resource) { > /* > * We received a message from a specific resource, so >@@ -156,7 +158,18 @@ > jm->body = jabber_google_format_to_html(jm->body); > g_free(tmp); > } >- serv_got_im(gc, jm->from, jm->xhtml ? jm->xhtml : jm->body, 0, jm->sent); >+ >+ msgbody = g_strdup (jm->xhtml ? jm->xhtml : jm->body); >+ >+ /* Don't throw away the subject line */ >+ if (jm->subject != NULL) { >+ char *tmp = msgbody; >+ msgbody = g_strdup_printf("<b>%s</b><br /> %s", jm->subject, msgbody); >+ g_free(tmp); >+ } >+ >+ serv_got_im(gc, jm->from, msgbody, 0, jm->sent); >+ g_free(msgbody); > } > > jabber_id_free(jid); >@@ -219,7 +232,8 @@ > { > JabberID *jid = jabber_id_new(jm->from); > JabberChat *chat; >- >+ char * msgbody; >+ > if(!jid) > return; > >@@ -228,6 +242,17 @@ > if(!chat) > return; > >+ msgbody = g_strdup (jm->xhtml ? jm->xhtml : jm->body); >+ >+ /* Don't throw away the subject line */ >+ if (jm->subject != NULL) { >+ char *tmp = msgbody; >+ msgbody = g_strdup_printf("<b>%s</b><br /> %s", jm->subject, msgbody); >+ g_free(tmp); >+ } >+ >+ /* The subject line is not the same as the topic! */ >+ /* > if(jm->subject) { > purple_conv_chat_set_topic(PURPLE_CONV_CHAT(chat->conv), jid->resource, > jm->subject); >@@ -244,19 +269,20 @@ > g_free(tmp2); > g_free(msg); > } >- } >+ } */ > > if(jm->xhtml || jm->body) { > if(jid->resource) > serv_got_chat_in(jm->js->gc, chat->id, jid->resource, > jm->delayed ? PURPLE_MESSAGE_DELAYED : 0, >- jm->xhtml ? jm->xhtml : jm->body, jm->sent); >+ msgbody, jm->sent); > else if(chat->muc) > purple_conv_chat_write(PURPLE_CONV_CHAT(chat->conv), "", >- jm->xhtml ? jm->xhtml : jm->body, >+ msgbody, > PURPLE_MESSAGE_SYSTEM, jm->sent); > } > >+ g_free(msgbody); > jabber_id_free(jid); > } > >@@ -282,6 +308,7 @@ > static void handle_error(JabberMessage *jm) > { > char *buf; >+ char *msgbody; > > if(!jm->body) > return; >@@ -289,10 +316,16 @@ > buf = g_strdup_printf(_("Message delivery to %s failed: %s"), > jm->from, jm->error ? jm->error : ""); > >+ msgbody = (! jm->subject ) ? >+ g_strdup(jm->xhtml ? jm->xhtml : jm->body) >+ : g_strdup_printf("<b>%s</b><br /> %s", >+ jm->subject, jm->xhtml ? jm->xhtml : jm->body); >+ > purple_notify_formatted(jm->js->gc, _("XMPP Message Error"), _("XMPP Message Error"), buf, >- jm->xhtml ? jm->xhtml : jm->body, NULL, NULL); >+ msgbody, NULL, NULL); > > g_free(buf); >+ g_free(msgbody); > } > > static void handle_buzz(JabberMessage *jm) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 465548
: 345242