Mercurial > pidgin
comparison libpurple/protocols/jabber/message.c @ 15659:94a19bde141d
Include the user's name/alias in the XEP 85 "gone" messages.
I previously added a "Delete Log" string... Do we need to honor the string
freeze in light of the rename?
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Mon, 19 Feb 2007 04:34:32 +0000 |
parents | e86623eb3b79 |
children | 32c366eeeb99 |
comparison
equal
deleted
inserted
replaced
15658:122be0df0567 | 15659:94a19bde141d |
---|---|
83 } else if(JM_STATE_PAUSED == jm->chat_state) { | 83 } else if(JM_STATE_PAUSED == jm->chat_state) { |
84 serv_got_typing(jm->js->gc, from, 0, GAIM_TYPED); | 84 serv_got_typing(jm->js->gc, from, 0, GAIM_TYPED); |
85 } else if(JM_STATE_GONE == jm->chat_state) { | 85 } else if(JM_STATE_GONE == jm->chat_state) { |
86 GaimConversation *conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, | 86 GaimConversation *conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, |
87 from, jm->js->gc->account); | 87 from, jm->js->gc->account); |
88 if (conv) { | 88 if (conv && jid->node && jid->domain) { |
89 #if 0 /* String freeze */ | 89 #if 0 /* String freeze... make sure to mark the message for translation */ |
90 gaim_conversation_write(conv, "", | 90 char buf[256]; |
91 "So and so has left the conversation.", | 91 GaimBuddy *buddy; |
92 GAIM_MESSAGE_INFO, time(NULL)); | 92 |
93 g_snprintf(buf, sizeof(buf), "%s@%s", jid->node, jid->domain); | |
94 | |
95 if ((buddy = gaim_find_buddy(jm->js->gc->account, buf))) { | |
96 const char *who; | |
97 char *escaped; | |
98 | |
99 who = gaim_buddy_get_alias(buddy); | |
100 escaped = g_markup_escape_text(who, -1); | |
101 | |
102 g_snprintf(buf, sizeof(buf), | |
103 "%s has left the conversation.", escaped); | |
104 | |
105 /* At some point when we restructure GaimConversation, | |
106 * this should be able to be implemented by removing the | |
107 * user from the conversation like we do with chats now. */ | |
108 gaim_conversation_write(conv, "", buf, | |
109 GAIM_MESSAGE_SYSTEM, time(NULL)); | |
110 } | |
93 #endif | 111 #endif |
94 | |
95 } | 112 } |
96 serv_got_typing_stopped(jm->js->gc, from); | 113 serv_got_typing_stopped(jm->js->gc, from); |
97 | 114 |
98 } else { | 115 } else { |
99 serv_got_typing_stopped(jm->js->gc, from); | 116 serv_got_typing_stopped(jm->js->gc, from); |