--- a/finch/gntblist.c Mon May 17 20:32:56 2021 -0500
+++ b/finch/gntblist.c Tue May 18 02:04:53 2021 -0500
@@ -612,16 +612,16 @@
PurpleAccount *account = purple_chat_get_account(chat);
- PurpleChatConversation *conv;
+ PurpleConversation *conv; name = purple_chat_get_name_only(chat);
conv = purple_conversations_find_chat_with_account(name, account);
- if (!conv || purple_chat_conversation_has_left(conv)) {
+ if (!conv || purple_chat_conversation_has_left(PURPLE_CHAT_CONVERSATION(conv))) { purple_serv_join_chat(purple_account_get_connection(account),
purple_chat_get_components(chat));
- purple_conversation_present(PURPLE_CONVERSATION(conv));
+ purple_conversation_present(conv); @@ -916,17 +916,17 @@
if (PURPLE_IS_BUDDY(node))
PurpleBuddy *buddy = (PurpleBuddy *)node;
- PurpleIMConversation *im;
+ PurpleConversation *im; im = purple_conversations_find_im_with_account(purple_buddy_get_name(buddy),
purple_buddy_get_account(buddy));
im = purple_im_conversation_new(purple_buddy_get_account(buddy),
purple_buddy_get_name(buddy));
- FinchConv *ggconv = FINCH_CONV(PURPLE_CONVERSATION(im));
+ FinchConv *ggconv = FINCH_CONV(im); gnt_window_present(ggconv->window);
- finch_conversation_set_active(PURPLE_CONVERSATION(im));
+ finch_conversation_set_active(im); else if (PURPLE_IS_CHAT(node))
@@ -2602,13 +2602,13 @@
- PurpleIMConversation *im;
+ PurpleConversation *im; account = purple_request_fields_get_account(fields, "account");
username = purple_request_fields_get_string(fields, "screenname");
im = purple_im_conversation_new(account, username);
- purple_conversation_present(PURPLE_CONVERSATION(im));
+ purple_conversation_present(im); @@ -2652,7 +2652,7 @@
- PurpleChatConversation *conv;
+ PurpleConversation *conv; account = purple_request_fields_get_account(fields, "account");
name = purple_request_fields_get_string(fields, "chat");
@@ -2666,9 +2666,9 @@
* a new conversation window will pop up when we finally join the chat. */
if (!(conv = purple_conversations_find_chat_with_account(name, account))) {
conv = purple_chat_conversation_new(account, name);
- purple_chat_conversation_leave(conv);
+ purple_chat_conversation_leave(PURPLE_CHAT_CONVERSATION(conv)); - purple_conversation_present(PURPLE_CONVERSATION(conv));
+ purple_conversation_present(conv); chat = purple_blist_find_chat(account, name);
--- a/libpurple/buddy.c Mon May 17 20:32:56 2021 -0500
+++ b/libpurple/buddy.c Tue May 18 02:04:53 2021 -0500
@@ -436,7 +436,7 @@
purple_buddy_set_local_alias(PurpleBuddy *buddy, const gchar *alias) {
PurpleBuddyList *blist = NULL;
PurpleBuddyPrivate *priv = NULL;
- PurpleIMConversation *im = NULL;
+ PurpleConversation *im = NULL; gchar *old_alias = NULL, *new_alias = NULL;
g_return_if_fail(PURPLE_IS_BUDDY(buddy));
@@ -469,7 +469,7 @@
im = purple_conversations_find_im_with_account(priv->name, priv->account);
if(PURPLE_IS_IM_CONVERSATION(im)) {
- purple_conversation_autoset_title(PURPLE_CONVERSATION(im));
+ purple_conversation_autoset_title(im); purple_signal_emit(purple_blist_get_handle(), "blist-node-aliased", buddy,
@@ -492,7 +492,7 @@
purple_buddy_set_server_alias(PurpleBuddy *buddy, const gchar *alias) {
PurpleBuddyList *blist = NULL;
PurpleBuddyPrivate *priv = NULL;
- PurpleIMConversation *im = NULL;
+ PurpleConversation *im = NULL; gchar *old_alias = NULL, *new_alias = NULL;
g_return_if_fail(PURPLE_IS_BUDDY(buddy));
@@ -527,7 +527,7 @@
im = purple_conversations_find_im_with_account(priv->name, priv->account);
if(PURPLE_IS_IM_CONVERSATION(im)) {
- purple_conversation_autoset_title(PURPLE_CONVERSATION(im));
+ purple_conversation_autoset_title(im); purple_signal_emit(purple_blist_get_handle(), "blist-node-aliased", buddy,
--- a/libpurple/protocols/facebook/facebook.c Mon May 17 20:32:56 2021 -0500
+++ b/libpurple/protocols/facebook/facebook.c Tue May 18 02:04:53 2021 -0500
@@ -390,7 +390,7 @@
- PurpleChatConversation *chat;
+ PurpleConversation *chat; gc = fb_data_get_connection(fata);
@@ -411,7 +411,7 @@
case FB_API_EVENT_TYPE_THREAD_TOPIC:
- purple_chat_conversation_set_topic(chat, uid,
+ purple_chat_conversation_set_topic(PURPLE_CHAT_CONVERSATION(chat), uid, @@ -431,12 +431,12 @@
- purple_chat_conversation_add_user(chat, uid, NULL, 0,
+ purple_chat_conversation_add_user(PURPLE_CHAT_CONVERSATION(chat), uid, NULL, 0, case FB_API_EVENT_TYPE_THREAD_USER_REMOVED:
- purple_chat_conversation_remove_user(chat, uid, event->text);
+ purple_chat_conversation_remove_user(PURPLE_CHAT_CONVERSATION(chat), uid, event->text); @@ -506,7 +506,7 @@
- PurpleChatConversation *chat;
+ PurpleConversation *chat; PurpleMessageFlags flags;
@@ -577,7 +577,7 @@
purple_serv_got_joined_chat(gc, id, tid);
fb_api_thread(api, msg->tid);
- id = purple_chat_conversation_get_id(chat);
+ id = purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(chat)); @@ -631,6 +631,7 @@
+ PurpleConversation *conv; PurpleChatConversation *chat;
@@ -639,10 +640,10 @@
id = fb_id_hash(&thrd->tid);
FB_ID_TO_STR(thrd->tid, tid);
- chat = purple_conversations_find_chat_with_account(tid, acct);
- if ((chat == NULL) || purple_chat_conversation_has_left(chat)) {
- chat = purple_serv_got_joined_chat(gc, id, tid);
+ conv = purple_conversations_find_chat_with_account(tid, acct); + if((conv == NULL) || purple_chat_conversation_has_left(PURPLE_CHAT_CONVERSATION(conv))) { + conv = purple_serv_got_joined_chat(gc, id, tid); + chat = PURPLE_CHAT_CONVERSATION(conv); /* If there are no users in the group chat, including
@@ -650,6 +651,7 @@
* setup by this function. As a result, any group chat
* without users is inactive.
+ chat = PURPLE_CHAT_CONVERSATION(conv); active = purple_chat_conversation_get_users_count(chat) > 0;
@@ -700,7 +702,7 @@
- PurpleChatConversation *chat;
+ PurpleConversation *chat; FB_ID_TO_STR(thrd->tid, tid);
@@ -720,10 +722,10 @@
- purple_conversation_write_system_message(PURPLE_CONVERSATION(chat),
+ purple_conversation_write_system_message(chat, _("You have been removed from this chat"), 0);
- purple_serv_got_chat_left(gc, purple_chat_conversation_get_id(chat));
+ purple_serv_got_chat_left(gc, purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(chat))); @@ -1305,7 +1307,7 @@
- PurpleChatConversation *chat;
+ PurpleConversation *chat; PurpleRequestCommonParameters *cpar;
name = g_hash_table_lookup(data, "name");
@@ -1325,8 +1327,8 @@
chat = purple_conversations_find_chat(gc, id);
- if ((chat != NULL) && !purple_chat_conversation_has_left(chat)) {
- purple_conversation_present(PURPLE_CONVERSATION(chat));
+ if ((chat != NULL) && !purple_chat_conversation_has_left(PURPLE_CHAT_CONVERSATION(chat))) { + purple_conversation_present(chat); @@ -1355,7 +1357,7 @@
- PurpleChatConversation *chat;
+ PurpleConversation *chat; PurpleRequestCommonParameters *cpar;
if (!FB_ID_IS_STR(who)) {
@@ -1372,7 +1374,7 @@
api = fb_data_get_api(fata);
chat = purple_conversations_find_chat(gc, id);
- name = purple_conversation_get_name(PURPLE_CONVERSATION(chat));
+ name = purple_conversation_get_name(chat); tid = FB_ID_FROM_STR(name);
uid = FB_ID_FROM_STR(who);
@@ -1390,14 +1392,14 @@
- PurpleChatConversation *chat;
+ PurpleConversation *chat; acct = purple_connection_get_account(gc);
fata = purple_connection_get_protocol_data(gc);
api = fb_data_get_api(fata);
chat = purple_conversations_find_chat(gc, id);
- name = purple_conversation_get_name(PURPLE_CONVERSATION(chat));
+ name = purple_conversation_get_name(chat); tid = FB_ID_FROM_STR(name);
text = purple_message_get_contents(msg);
@@ -1421,13 +1423,13 @@
- PurpleChatConversation *chat;
+ PurpleConversation *chat; fata = purple_connection_get_protocol_data(gc);
api = fb_data_get_api(fata);
chat = purple_conversations_find_chat(gc, id);
- name = purple_conversation_get_name(PURPLE_CONVERSATION(chat));
+ name = purple_conversation_get_name(chat); tid = FB_ID_FROM_STR(name);
fb_api_thread_topic(api, tid, topic);
--- a/libpurple/protocols/irc/msgs.c Mon May 17 20:32:56 2021 -0500
+++ b/libpurple/protocols/irc/msgs.c Tue May 18 02:04:53 2021 -0500
@@ -258,7 +258,7 @@
void irc_msg_ban(struct irc_conn *irc, const char *name, const char *from, char **args)
- PurpleChatConversation *chat;
+ PurpleConversation *chat; chat = purple_conversations_find_chat_with_account(args[1], irc->account);
@@ -278,7 +278,7 @@
purple_conversation_write_system_message(
- PURPLE_CONVERSATION(chat), msg, PURPLE_MESSAGE_NO_LOG);
+ chat, msg, PURPLE_MESSAGE_NO_LOG); purple_debug_info("irc", "%s\n", msg);
@@ -287,7 +287,7 @@
- purple_conversation_write_system_message(PURPLE_CONVERSATION(chat),
+ purple_conversation_write_system_message(chat, _("End of ban list"), PURPLE_MESSAGE_NO_LOG);
@@ -307,7 +307,7 @@
void irc_msg_banfull(struct irc_conn *irc, const char *name, const char *from, char **args)
- PurpleChatConversation *chat;
+ PurpleConversation *chat; chat = purple_conversations_find_chat_with_account(args[1], irc->account);
@@ -317,14 +317,14 @@
nick = g_markup_escape_text(args[2], -1);
buf = g_strdup_printf(_("Cannot ban %s: banlist is full"), nick);
- purple_conversation_write_system_message(PURPLE_CONVERSATION(chat),
+ purple_conversation_write_system_message(chat, buf, PURPLE_MESSAGE_NO_LOG);
void irc_msg_chanmode(struct irc_conn *irc, const char *name, const char *from, char **args)
- PurpleChatConversation *chat;
+ PurpleConversation *chat; chat = purple_conversations_find_chat_with_account(args[1], irc->account);
@@ -333,7 +333,7 @@
escaped = (args[3] != NULL) ? g_markup_escape_text(args[3], -1) : NULL;
buf = g_strdup_printf("mode for %s: %s %s", args[1], args[2], escaped ? escaped : "");
- purple_conversation_write_system_message(PURPLE_CONVERSATION(chat), buf, 0);
+ purple_conversation_write_system_message(chat, buf, 0); @@ -465,7 +465,7 @@
void irc_msg_who(struct irc_conn *irc, const char *name, const char *from, char **args)
if (purple_strequal(name, "352")) {
- PurpleChatConversation *chat;
+ PurpleConversation *chat; char *cur, *userhost, *realname;
@@ -478,7 +478,7 @@
- cb = purple_chat_conversation_find_user(chat, args[5]);
+ cb = purple_chat_conversation_find_user(PURPLE_CHAT_CONVERSATION(chat), args[5]); purple_debug_error("irc", "Got a WHO response for %s who isn't a buddy.", args[5]);
@@ -552,7 +552,7 @@
void irc_msg_topic(struct irc_conn *irc, const char *name, const char *from, char **args)
char *chan, *topic, *msg, *nick, *tmp, *tmp2;
- PurpleChatConversation *chat;
+ PurpleConversation *chat; if (purple_strequal(name, "topic")) {
@@ -574,13 +574,13 @@
tmp2 = purple_markup_linkify(tmp);
if (purple_strequal(name, "topic")) {
- const char *current_topic = purple_chat_conversation_get_topic(chat);
+ const char *current_topic = purple_chat_conversation_get_topic(PURPLE_CHAT_CONVERSATION(chat)); if (!(current_topic != NULL && purple_strequal(tmp2, current_topic)))
nick = irc_mask_nick(from);
nick_esc = g_markup_escape_text(nick, -1);
- purple_chat_conversation_set_topic(chat, nick, topic);
+ purple_chat_conversation_set_topic(PURPLE_CHAT_CONVERSATION(chat), nick, topic); msg = g_strdup_printf(_("%s has changed the topic to: %s"), nick_esc, tmp2);
@@ -588,15 +588,15 @@
purple_conversation_write_system_message(
- PURPLE_CONVERSATION(chat), msg, 0);
char *chan_esc = g_markup_escape_text(chan, -1);
msg = g_strdup_printf(_("The topic for %s is: %s"), chan_esc, tmp2);
- purple_chat_conversation_set_topic(chat, NULL, topic);
- purple_conversation_write_system_message(PURPLE_CONVERSATION(chat), msg, 0);
+ purple_chat_conversation_set_topic(PURPLE_CHAT_CONVERSATION(chat), NULL, topic); + purple_conversation_write_system_message(chat, msg, 0); @@ -605,7 +605,7 @@
void irc_msg_topicinfo(struct irc_conn *irc, const char *name, const char *from, char **args)
- PurpleChatConversation *chat;
+ PurpleConversation *chat; char *msg, *timestamp, *datestamp;
@@ -634,7 +634,7 @@
timestamp = g_date_time_format(local, "%X");
datestamp = g_date_time_format(local, "%x");
msg = g_strdup_printf(_("Topic for %s set by %s at %s on %s"), args[1], args[2], timestamp, datestamp);
- purple_conversation_write_system_message(PURPLE_CONVERSATION(chat),
+ purple_conversation_write_system_message(chat, msg, PURPLE_MESSAGE_NO_LINKIFY);
@@ -821,11 +821,11 @@
void irc_msg_nosend(struct irc_conn *irc, const char *name, const char *from, char **args)
- PurpleChatConversation *chat;
+ PurpleConversation *chat; chat = purple_conversations_find_chat_with_account(args[1], irc->account);
- purple_conversation_write_system_message(PURPLE_CONVERSATION(chat), args[2],
+ purple_conversation_write_system_message(chat, args[2], if ((gc = purple_account_get_connection(irc->account)) == NULL)
@@ -837,26 +837,26 @@
void irc_msg_notinchan(struct irc_conn *irc, const char *name, const char *from, char **args)
- PurpleChatConversation *chat = purple_conversations_find_chat_with_account(args[1], irc->account);
+ PurpleConversation *chat = purple_conversations_find_chat_with_account(args[1], irc->account); purple_debug_info("irc", "We're apparently not in %s, but tried to use it", args[1]);
/*g_slist_remove(irc->gc->buddy_chats, chat);
purple_conversation_set_account(chat, NULL);*/
- purple_conversation_write_system_message(PURPLE_CONVERSATION(chat),
+ purple_conversation_write_system_message(chat, args[2], PURPLE_MESSAGE_NO_LOG);
void irc_msg_notop(struct irc_conn *irc, const char *name, const char *from, char **args)
- PurpleChatConversation *chat;
+ PurpleConversation *chat; chat = purple_conversations_find_chat_with_account(args[1], irc->account);
- purple_conversation_write_system_message(PURPLE_CONVERSATION(chat), args[2], 0);
+ purple_conversation_write_system_message(chat, args[2], 0); void irc_msg_invite(struct irc_conn *irc, const char *name, const char *from, char **args)
@@ -931,7 +931,7 @@
void irc_msg_join(struct irc_conn *irc, const char *name, const char *from, char **args)
PurpleConnection *gc = purple_account_get_connection(irc->account);
- PurpleChatConversation *chat;
+ PurpleConversation *chat; char *nick, *userhost, *buf;
@@ -976,9 +976,9 @@
userhost = irc_mask_userhost(from);
- purple_chat_conversation_add_user(chat, nick, userhost, PURPLE_CHAT_USER_NONE, TRUE);
+ purple_chat_conversation_add_user(PURPLE_CHAT_CONVERSATION(chat), nick, userhost, PURPLE_CHAT_USER_NONE, TRUE); - cb = purple_chat_conversation_find_user(chat, nick);
+ cb = purple_chat_conversation_find_user(PURPLE_CHAT_CONVERSATION(chat), nick); g_object_set_data_full(G_OBJECT(cb), "userhost", userhost, g_free);
@@ -995,7 +995,7 @@
void irc_msg_kick(struct irc_conn *irc, const char *name, const char *from, char **args)
PurpleConnection *gc = purple_account_get_connection(irc->account);
- PurpleChatConversation *chat = purple_conversations_find_chat_with_account(args[0], irc->account);
+ PurpleConversation *chat = purple_conversations_find_chat_with_account(args[0], irc->account); @@ -1012,10 +1012,10 @@
buf = g_strdup_printf(_("You have been kicked by %s: (%s)"), nick, args[2]);
purple_conversation_write_system_message(PURPLE_CONVERSATION(chat), buf, 0);
- purple_serv_got_chat_left(gc, purple_chat_conversation_get_id(chat));
+ purple_serv_got_chat_left(gc, purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(chat))); buf = g_strdup_printf(_("Kicked by %s (%s)"), nick, args[2]);
- purple_chat_conversation_remove_user(chat, args[1], buf);
+ purple_chat_conversation_remove_user(PURPLE_CHAT_CONVERSATION(chat), args[1], buf); @@ -1024,7 +1024,7 @@
void irc_msg_mode(struct irc_conn *irc, const char *name, const char *from, char **args)
- PurpleChatConversation *chat;
+ PurpleConversation *chat; char *nick = irc_mask_nick(from), *buf;
if (*args[0] == '#' || *args[0] == '&') { /* Channel */
@@ -1037,7 +1037,7 @@
escaped = (args[2] != NULL) ? g_markup_escape_text(args[2], -1) : NULL;
buf = g_strdup_printf(_("mode (%s %s) by %s"), args[1], escaped ? escaped : "", nick);
- purple_conversation_write_system_message(PURPLE_CONVERSATION(chat), buf, 0);
+ purple_conversation_write_system_message(chat, buf, 0); @@ -1057,7 +1057,7 @@
user = g_strndup(cur, end - cur);
- cb = purple_chat_conversation_find_user(chat, user);
+ cb = purple_chat_conversation_find_user(PURPLE_CHAT_CONVERSATION(chat), user); flags = purple_chat_user_get_flags(cb);
newflag = PURPLE_CHAT_USER_NONE;
@@ -1092,7 +1092,7 @@
void irc_msg_nick(struct irc_conn *irc, const char *name, const char *from, char **args)
PurpleConnection *gc = purple_account_get_connection(irc->account);
- PurpleIMConversation *im;
+ PurpleConversation *im; char *nick = irc_mask_nick(from);
@@ -1119,7 +1119,7 @@
im = purple_conversations_find_im_with_account(nick,
- purple_conversation_set_name(PURPLE_CONVERSATION(im), args[0]);
+ purple_conversation_set_name(im, args[0]); @@ -1201,7 +1201,7 @@
void irc_msg_part(struct irc_conn *irc, const char *name, const char *from, char **args)
PurpleConnection *gc = purple_account_get_connection(irc->account);
- PurpleChatConversation *chat;
+ PurpleConversation *chat; char *nick, *msg, *channel;
@@ -1223,12 +1223,12 @@
(args[1] && *args[1]) ? ": " : "",
(escaped && *escaped) ? escaped : "");
- purple_conversation_write_system_message(PURPLE_CONVERSATION(chat), msg, 0);
+ purple_conversation_write_system_message(chat, msg, 0); - purple_serv_got_chat_left(gc, purple_chat_conversation_get_id(chat));
+ purple_serv_got_chat_left(gc, purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(chat))); msg = args[1] ? irc_mirc2txt(args[1]) : NULL;
- purple_chat_conversation_remove_user(chat, nick, msg);
+ purple_chat_conversation_remove_user(PURPLE_CHAT_CONVERSATION(chat), nick, msg); @@ -1289,7 +1289,7 @@
static void irc_msg_handle_privmsg(struct irc_conn *irc, const char *name, const char *from, const char *to, const char *rawmsg, gboolean notice)
PurpleConnection *gc = purple_account_get_connection(irc->account);
- PurpleChatConversation *chat;
+ PurpleConversation *chat; @@ -1321,7 +1321,7 @@
chat = purple_conversations_find_chat_with_account(irc_nick_skip_mode(irc, to), irc->account);
- purple_serv_got_chat_in(gc, purple_chat_conversation_get_id(chat),
+ purple_serv_got_chat_in(gc, purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(chat)), nick, PURPLE_MESSAGE_RECV, msg, time(NULL));
purple_debug_error("irc", "Got a %s on %s, which does not exist\n",
--- a/libpurple/protocols/novell/novell.c Mon May 17 20:32:56 2021 -0500
+++ b/libpurple/protocols/novell/novell.c Tue May 18 02:04:53 2021 -0500
@@ -654,7 +654,7 @@
_join_conf_resp_cb(NMUser * user, NMERR_T ret_code,
gpointer resp_data, gpointer user_data)
- PurpleChatConversation *chat;
+ PurpleConversation *chat; NMConference *conference = user_data;
@@ -678,7 +678,7 @@
ur = nm_conference_get_participant(conference, i);
name = nm_user_record_get_display_id(ur);
- purple_chat_conversation_add_user(chat, name, NULL,
+ purple_chat_conversation_add_user(PURPLE_CHAT_CONVERSATION(chat), name, NULL, PURPLE_CHAT_USER_NONE, TRUE);
@@ -1612,7 +1612,7 @@
- PurpleChatConversation *chat = NULL;
+ PurpleConversation *chat = NULL; NMUserRecord *user_record;
NMConference *conference;
@@ -1771,7 +1771,7 @@
NMUserRecord *user_record = NULL;
NMContact *contact = NULL;
- PurpleIMConversation *im;
+ PurpleConversation *im; NMConference *conference;
PurpleMessageFlags flags;
@@ -1781,7 +1781,7 @@
conference = nm_event_get_conference(event);
- PurpleChatConversation *chat = nm_conference_get_data(conference);
+ PurpleConversation *chat = nm_conference_get_data(conference); /* Is this a single person 'conversation' or a conference? */
if (chat == NULL && nm_conference_get_participant_count(conference) == 1) {
@@ -1806,7 +1806,7 @@
contact = nm_find_contact(user, nm_event_get_source(event));
- purple_conversation_set_title(PURPLE_CONVERSATION(im),
+ purple_conversation_set_title(im, nm_contact_get_display_name(contact));
@@ -1818,7 +1818,7 @@
name = nm_user_record_get_userid(user_record);
- purple_conversation_set_title(PURPLE_CONVERSATION(im), name);
+ purple_conversation_set_title(im, name); @@ -1849,7 +1849,7 @@
purple_serv_got_chat_in(purple_account_get_connection(user->client_data),
- purple_chat_conversation_get_id(chat),
+ purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(chat)), name, PURPLE_MESSAGE_RECV, text, nm_event_get_gmt(event));
@@ -1948,7 +1948,7 @@
_evt_conference_joined(NMUser * user, NMEvent * event)
- PurpleChatConversation *chat = NULL;
+ PurpleConversation *chat = NULL; NMConference *conference = NULL;
@@ -1973,7 +1973,7 @@
nm_conference_set_data(conference, (gpointer) chat);
name = nm_user_record_get_display_id(ur);
- purple_chat_conversation_add_user(chat, name, NULL,
+ purple_chat_conversation_add_user(PURPLE_CHAT_CONVERSATION(chat), name, NULL, PURPLE_CHAT_USER_NONE, TRUE);
@@ -1984,8 +1984,8 @@
ur = nm_find_user_record(user, nm_event_get_source(event));
name = nm_user_record_get_display_id(ur);
- if (!purple_chat_conversation_has_user(chat, name)) {
- purple_chat_conversation_add_user(chat, name, NULL,
+ if (!purple_chat_conversation_has_user(PURPLE_CHAT_CONVERSATION(chat), name)) { + purple_chat_conversation_add_user(PURPLE_CHAT_CONVERSATION(chat), name, NULL, PURPLE_CHAT_USER_NONE, TRUE);
@@ -2470,7 +2470,7 @@
gint id, PurpleMessage *msg)
NMConference *conference;
- PurpleChatConversation *chat;
+ PurpleConversation *chat; @@ -2492,7 +2492,7 @@
for (cnode = user->conferences; cnode != NULL; cnode = cnode->next) {
conference = cnode->data;
if (conference && (chat = nm_conference_get_data(conference))) {
- if (purple_chat_conversation_get_id(chat) == id) {
+ if (purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(chat)) == id) { nm_message_set_conference(message, conference);
@@ -2538,7 +2538,7 @@
str = g_strdup(_("This conference has been closed."
" No more messages can be sent."));
- purple_conversation_write_system_message(PURPLE_CONVERSATION(chat), str, 0);
+ purple_conversation_write_system_message(chat, str, 0); --- a/libpurple/protocols/null/nullprpl.c Mon May 17 20:32:56 2021 -0500
+++ b/libpurple/protocols/null/nullprpl.c Tue May 18 02:04:53 2021 -0500
@@ -116,12 +116,12 @@
-typedef void(*ChatFunc)(PurpleChatConversation *from, PurpleChatConversation *to,
+typedef void(*ChatFunc)(PurpleConversation *from, PurpleConversation *to, int id, const char *room, gpointer userdata);
- PurpleChatConversation *from_chat;
+ PurpleConversation *from_chat; @@ -129,16 +129,16 @@
PurpleConnection *to = (PurpleConnection *)data;
ChatFuncData *cfdata = (ChatFuncData *)userdata;
- int id = purple_chat_conversation_get_id(cfdata->from_chat);
- PurpleChatConversation *chat = purple_conversations_find_chat(to, id);
+ int id = purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(cfdata->from_chat)); + PurpleConversation *chat = purple_conversations_find_chat(to, id); cfdata->fn(cfdata->from_chat, chat, id,
- purple_conversation_get_name(PURPLE_CONVERSATION(chat)), cfdata->userdata);
+ purple_conversation_get_name(chat), cfdata->userdata); static void foreach_gc_in_chat(ChatFunc fn, PurpleConnection *from,
int id, gpointer userdata) {
- PurpleChatConversation *chat = purple_conversations_find_chat(from, id);
+ PurpleConversation *chat = purple_conversations_find_chat(from, id); ChatFuncData cfdata = { fn,
@@ -718,13 +718,13 @@
-static void joined_chat(PurpleChatConversation *from, PurpleChatConversation *to,
+static void joined_chat(PurpleConversation *from, PurpleConversation *to, int id, const char *room, gpointer userdata) {
/* tell their chat window that we joined */
purple_debug_info("nullprpl", "%s sees that %s joined chat room %s\n",
- purple_chat_conversation_get_nick(to), purple_chat_conversation_get_nick(from), room);
- purple_chat_conversation_add_user(to,
- purple_chat_conversation_get_nick(from),
+ purple_chat_conversation_get_nick(PURPLE_CHAT_CONVERSATION(to)), purple_chat_conversation_get_nick(PURPLE_CHAT_CONVERSATION(from)), room); + purple_chat_conversation_add_user(PURPLE_CHAT_CONVERSATION(to), + purple_chat_conversation_get_nick(PURPLE_CHAT_CONVERSATION(from)), NULL, /* user-provided join message, IRC style */
TRUE); /* show a join message */
@@ -732,9 +732,9 @@
/* add them to our chat window */
purple_debug_info("nullprpl", "%s sees that %s is in chat room %s\n",
- purple_chat_conversation_get_nick(from), purple_chat_conversation_get_nick(to), room);
- purple_chat_conversation_add_user(from,
- purple_chat_conversation_get_nick(to),
+ purple_chat_conversation_get_nick(PURPLE_CHAT_CONVERSATION(from)), purple_chat_conversation_get_nick(PURPLE_CHAT_CONVERSATION(to)), room); + purple_chat_conversation_add_user(PURPLE_CHAT_CONVERSATION(from), + purple_chat_conversation_get_nick(PURPLE_CHAT_CONVERSATION(to)), NULL, /* user-provided join message, IRC style */
FALSE); /* show a join message */
@@ -805,15 +805,15 @@
gint id, const gchar *message, const gchar *who)
const char *username = purple_account_get_username(purple_connection_get_account(gc));
- PurpleChatConversation *chat = purple_conversations_find_chat(gc, id);
- const char *room = purple_conversation_get_name(PURPLE_CONVERSATION(chat));
+ PurpleConversation *chat = purple_conversations_find_chat(gc, id); + const char *room = purple_conversation_get_name(chat); PurpleAccount *to_acct = purple_accounts_find(who, "null");
purple_debug_info("nullprpl", "%s is inviting %s to join chat room %s\n",
- PurpleChatConversation *to_conv = purple_conversations_find_chat(purple_account_get_connection(to_acct), id);
+ PurpleConversation *to_conv = purple_conversations_find_chat(purple_account_get_connection(to_acct), id); char *tmp = g_strdup_printf("%s is already in chat room %s.", who, room);
purple_debug_info("nullprpl",
@@ -821,7 +821,7 @@
"ignoring invitation from %s\n",
purple_notify_info(gc, _("Chat invitation"), _("Chat invitation"), tmp,
- purple_request_cpar_from_conversation(PURPLE_CONVERSATION(to_conv)));
+ purple_request_cpar_from_conversation(to_conv)); @@ -833,14 +833,14 @@
-static void left_chat_room(PurpleChatConversation *from, PurpleChatConversation *to,
+static void left_chat_room(PurpleConversation *from, PurpleConversation *to, int id, const char *room, gpointer userdata) {
/* tell their chat window that we left */
purple_debug_info("nullprpl", "%s sees that %s left chat room %s\n",
- purple_chat_conversation_get_nick(to), purple_chat_conversation_get_nick(from), room);
- purple_chat_conversation_remove_user(to,
- purple_chat_conversation_get_nick(from),
+ purple_chat_conversation_get_nick(PURPLE_CHAT_CONVERSATION(to)), purple_chat_conversation_get_nick(PURPLE_CHAT_CONVERSATION(from)), room); + purple_chat_conversation_remove_user(PURPLE_CHAT_CONVERSATION(to), + purple_chat_conversation_get_nick(PURPLE_CHAT_CONVERSATION(from)), NULL); /* user-provided message, IRC style */
@@ -849,24 +849,24 @@
null_chat_leave(PurpleProtocolChat *protocol_chat, PurpleConnection *gc,
- PurpleChatConversation *chat = purple_conversations_find_chat(gc, id);
+ PurpleConversation *chat = purple_conversations_find_chat(gc, id); purple_debug_info("nullprpl", "%s is leaving chat room %s\n",
purple_account_get_username(purple_connection_get_account(gc)),
- purple_conversation_get_name(PURPLE_CONVERSATION(chat)));
+ purple_conversation_get_name(chat)); /* tell everyone that we left */
foreach_gc_in_chat(left_chat_room, gc, id, NULL);
-static void receive_chat_message(PurpleChatConversation *from, PurpleChatConversation *to,
+static void receive_chat_message(PurpleConversation *from, PurpleConversation *to, int id, const char *room, gpointer userdata) {
const char *message = (const char *)userdata;
- PurpleConnection *to_gc = get_null_gc(purple_chat_conversation_get_nick(to));
+ PurpleConnection *to_gc = get_null_gc(purple_chat_conversation_get_nick(PURPLE_CHAT_CONVERSATION(to))); purple_debug_info("nullprpl",
"%s receives message from %s in chat room %s: %s\n",
- purple_chat_conversation_get_nick(to), purple_chat_conversation_get_nick(from), room, message);
- purple_serv_got_chat_in(to_gc, id, purple_chat_conversation_get_nick(from), PURPLE_MESSAGE_RECV, message,
+ purple_chat_conversation_get_nick(PURPLE_CHAT_CONVERSATION(to)), purple_chat_conversation_get_nick(PURPLE_CHAT_CONVERSATION(from)), room, message); + purple_serv_got_chat_in(to_gc, id, purple_chat_conversation_get_nick(PURPLE_CHAT_CONVERSATION(from)), PURPLE_MESSAGE_RECV, message, @@ -875,13 +875,13 @@
gint id, PurpleMessage *msg)
const char *username = purple_account_get_username(purple_connection_get_account(gc));
- PurpleChatConversation *chat = purple_conversations_find_chat(gc, id);
+ PurpleConversation *chat = purple_conversations_find_chat(gc, id); const gchar *message = purple_message_get_contents(msg);
purple_debug_info("nullprpl",
"%s is sending message to chat room %s: %s\n", username,
- purple_conversation_get_name(PURPLE_CONVERSATION(chat)), message);
+ purple_conversation_get_name(chat), message); /* send message to everyone in the chat room */
foreach_gc_in_chat(receive_chat_message, gc, id, (gpointer)message);
@@ -966,21 +966,20 @@
-static void set_chat_topic_fn(PurpleChatConversation *from, PurpleChatConversation *to,
+static void set_chat_topic_fn(PurpleConversation *from, PurpleConversation *to, int id, const char *room, gpointer userdata) {
const char *topic = (const char *)userdata;
const char *username = purple_account_get_username(purple_conversation_get_account(PURPLE_CONVERSATION(from)));
- purple_chat_conversation_set_topic(to, username, topic);
+ purple_chat_conversation_set_topic(PURPLE_CHAT_CONVERSATION(to), username, topic); msg = g_strdup_printf(_("%s sets topic to: %s"), username, topic);
msg = g_strdup_printf(_("%s clears topic"), username);
- purple_conversation_write_system_message(PURPLE_CONVERSATION(to),
- msg, PURPLE_MESSAGE_NO_LOG);
+ purple_conversation_write_system_message(to, msg, PURPLE_MESSAGE_NO_LOG); @@ -988,7 +987,7 @@
null_set_chat_topic(PurpleProtocolChat *protocol_chat, PurpleConnection *gc,
gint id, const gchar *topic)
- PurpleChatConversation *chat = purple_conversations_find_chat(gc, id);
+ PurpleConversation *chat = purple_conversations_find_chat(gc, id); @@ -996,9 +995,9 @@
purple_debug_info("nullprpl", "%s sets topic of chat room '%s' to '%s'\n",
purple_account_get_username(purple_connection_get_account(gc)),
- purple_conversation_get_name(PURPLE_CONVERSATION(chat)), topic);
+ purple_conversation_get_name(chat), topic); - last_topic = purple_chat_conversation_get_topic(chat);
+ last_topic = purple_chat_conversation_get_topic(PURPLE_CHAT_CONVERSATION(chat)); if (purple_strequal(topic, last_topic))
return; /* topic is unchanged, this is a noop */
--- a/libpurple/protocols/sametime/sametime.c Mon May 17 20:32:56 2021 -0500
+++ b/libpurple/protocols/sametime/sametime.c Tue May 18 02:04:53 2021 -0500
@@ -292,7 +292,7 @@
static void convo_features(struct mwConversation *conv);
-static PurpleIMConversation *convo_get_im(struct mwConversation *conv);
+static PurpleConversation *convo_get_im(struct mwConversation *conv); @@ -1771,7 +1771,7 @@
struct mwPurpleProtocolData *pd;
- PurpleIMConversation *im;
+ PurpleConversation *im; char *who = from->user_id;
@@ -1791,7 +1791,7 @@
- purple_conversation_write_system_message(PURPLE_CONVERSATION(im), msg2, 0);
+ purple_conversation_write_system_message(im, msg2, 0); @@ -1919,7 +1919,7 @@
struct mwSession *session;
struct mwPurpleProtocolData *pd;
- PurpleChatConversation *g_conf;
+ PurpleConversation *g_conf; const char *n = mwConference_getName(conf);
const char *t = mwConference_getTitle(conf);
@@ -1938,7 +1938,7 @@
for(; members; members = members->next) {
struct mwLoginInfo *peer = members->data;
- purple_chat_conversation_add_user(g_conf, peer->user_id,
+ purple_chat_conversation_add_user(PURPLE_CHAT_CONVERSATION(g_conf), peer->user_id, NULL, PURPLE_CHAT_USER_NONE, FALSE);
@@ -2452,7 +2452,7 @@
-static PurpleIMConversation *convo_get_im(struct mwConversation *conv) {
+static PurpleConversation *convo_get_im(struct mwConversation *conv) { struct mwServiceIm *srvc;
struct mwSession *session;
struct mwPurpleProtocolData *pd;
@@ -2503,7 +2503,7 @@
/* Does what it takes to get an error displayed for a conversation */
static void convo_error(struct mwConversation *conv, guint32 err) {
- PurpleIMConversation *im;
+ PurpleConversation *im; @@ -2515,13 +2515,12 @@
if(im && !purple_conversation_present_error(idb->user,
- purple_conversation_get_account(PURPLE_CONVERSATION(im)), text)) {
+ purple_conversation_get_account(im), text)) { text = g_strdup_printf(_("Unable to send message to %s:"),
(idb->user)? idb->user: "(unknown)");
- pc = purple_account_get_connection(purple_conversation_get_account(
- PURPLE_CONVERSATION(im)));
+ pc = purple_account_get_connection(purple_conversation_get_account(im)); purple_notify_error(pc, NULL, text, tmp, purple_request_cpar_from_connection(pc));
@@ -2553,17 +2552,16 @@
inform the purple conversation that it's unsafe to offer any *cool*
static void convo_nofeatures(struct mwConversation *conv) {
- PurpleIMConversation *im;
+ PurpleConversation *im; - gc = purple_conversation_get_connection(PURPLE_CONVERSATION(im));
+ gc = purple_conversation_get_connection(im); - purple_conversation_set_features(PURPLE_CONVERSATION(im),
- purple_connection_get_flags(gc));
+ purple_conversation_set_features(im, purple_connection_get_flags(gc)); @@ -2571,13 +2569,13 @@
to inform the purple conversation of what features to offer the
static void convo_features(struct mwConversation *conv) {
- PurpleIMConversation *im;
+ PurpleConversation *im; PurpleConnectionFlags feat;
- feat = purple_conversation_get_features(PURPLE_CONVERSATION(im));
+ feat = purple_conversation_get_features(im); if(mwConversation_isOpen(conv)) {
if(mwConversation_supports(conv, mwImSend_HTML)) {
@@ -2593,7 +2591,7 @@
DEBUG_INFO("conversation features set to 0x%04x\n", feat);
- purple_conversation_set_features(PURPLE_CONVERSATION(im), feat);
+ purple_conversation_set_features(im, feat); @@ -2872,7 +2870,7 @@
struct mwSession *session;
struct mwPurpleProtocolData *pd;
- PurpleChatConversation *gconf;
+ PurpleConversation *gconf; @@ -2896,7 +2894,7 @@
for(l = members; l; l = l->next) {
struct mwIdBlock *idb = l->data;
- purple_chat_conversation_add_user(gconf, idb->user,
+ purple_chat_conversation_add_user(PURPLE_CHAT_CONVERSATION(gconf), idb->user, NULL, PURPLE_CHAT_USER_NONE, FALSE);
@@ -4039,14 +4037,14 @@
static void notify_im(PurpleConnection *gc, GList *row, void *user_data) {
- PurpleIMConversation *im;
+ PurpleConversation *im; acct = purple_connection_get_account(gc);
id = g_list_nth_data(row, 1);
im = purple_conversations_find_im_with_account(id, acct);
if(! im) im = purple_im_conversation_new(acct, id);
- purple_conversation_present(PURPLE_CONVERSATION(im));
+ purple_conversation_present(im); --- a/libpurple/protocols/silc/ops.c Mon May 17 20:32:56 2021 -0500
+++ b/libpurple/protocols/silc/ops.c Tue May 18 02:04:53 2021 -0500
@@ -94,7 +94,7 @@
const unsigned char *data;
PurpleMessageFlags cflags = 0;
- PurpleChatConversation *chat = NULL;
+ PurpleConversation *chat = NULL; @@ -218,7 +218,7 @@
purple_serv_got_chat_in(gc,
- purple_chat_conversation_get_id(chat),
+ purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(chat)), sender->nickname, cflags, tmp, time(NULL));
purple_serv_got_im(gc, sender->nickname,
@@ -263,7 +263,7 @@
PurpleConnection *gc = client->application;
SilcPurple sg = purple_connection_get_protocol_data(gc);
- PurpleChatConversation *chat = NULL;
+ PurpleConversation *chat = NULL; @@ -309,7 +309,7 @@
tmp = g_markup_escape_text(msg, -1);
- purple_serv_got_chat_in(gc, purple_chat_conversation_get_id(chat),
+ purple_serv_got_chat_in(gc, purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(chat)), sender->nickname, PURPLE_MESSAGE_RECV, tmp, time(NULL));
@@ -338,7 +338,7 @@
tmp = g_markup_escape_text(msg, -1);
- purple_serv_got_chat_in(gc, purple_chat_conversation_get_id(chat),
+ purple_serv_got_chat_in(gc, purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(chat)), sender->nickname, PURPLE_MESSAGE_RECV, tmp, time(NULL));
@@ -443,7 +443,7 @@
PurpleConnection *gc = client->application;
SilcPurple sg = purple_connection_get_protocol_data(gc);
PurpleAccount *account = purple_connection_get_account(gc);
- PurpleChatConversation *chat;
+ PurpleConversation *chat; SilcClientEntry client_entry, client_entry2;
SilcChannelEntry channel;
SilcServerEntry server_entry;
@@ -494,7 +494,7 @@
/* Join user to channel */
g_snprintf(buf, sizeof(buf), "%s@%s",
client_entry->username, client_entry->hostname);
- purple_chat_conversation_add_user(chat,
+ purple_chat_conversation_add_user(PURPLE_CHAT_CONVERSATION(chat), client_entry->nickname, buf, PURPLE_CHAT_USER_NONE, TRUE);
@@ -509,7 +509,7 @@
/* Remove user from channel */
- purple_chat_conversation_remove_user(chat,
+ purple_chat_conversation_remove_user(PURPLE_CHAT_CONVERSATION(chat), client_entry->nickname, NULL);
@@ -525,7 +525,7 @@
chu->channel->channel_name, sg->account);
- purple_chat_conversation_remove_user(chat,
+ purple_chat_conversation_remove_user(PURPLE_CHAT_CONVERSATION(chat), @@ -560,7 +560,7 @@
client_entry->nickname, channel->channel_name, tmp2);
purple_conversation_write_system_message(
PURPLE_CONVERSATION(chat), buf, 0);
- purple_chat_conversation_set_topic(chat,
+ purple_chat_conversation_set_topic(PURPLE_CHAT_CONVERSATION(chat), client_entry->nickname, tmp);
} else if (idtype == SILC_ID_SERVER) {
server_entry = (SilcServerEntry)entry;
@@ -569,7 +569,7 @@
server_entry->server_name, channel->channel_name, tmp2);
purple_conversation_write_system_message(
PURPLE_CONVERSATION(chat), buf, 0);
- purple_chat_conversation_set_topic(chat,
+ purple_chat_conversation_set_topic(PURPLE_CHAT_CONVERSATION(chat), server_entry->server_name, tmp);
} else if (idtype == SILC_ID_CHANNEL) {
channel = (SilcChannelEntry)entry;
@@ -578,10 +578,10 @@
channel->channel_name, channel->channel_name, tmp2);
purple_conversation_write_system_message(
PURPLE_CONVERSATION(chat), buf, 0);
- purple_chat_conversation_set_topic(chat,
+ purple_chat_conversation_set_topic(PURPLE_CHAT_CONVERSATION(chat), channel->channel_name, tmp);
- purple_chat_conversation_set_topic(chat, NULL, tmp);
+ purple_chat_conversation_set_topic(PURPLE_CHAT_CONVERSATION(chat), NULL, tmp); @@ -604,8 +604,8 @@
chu->channel->channel_name, sg->account);
- if (purple_chat_conversation_has_user(chat, client_entry->nickname))
- purple_chat_conversation_rename_user(chat,
+ if (purple_chat_conversation_has_user(PURPLE_CHAT_CONVERSATION(chat), client_entry->nickname)) + purple_chat_conversation_rename_user(PURPLE_CHAT_CONVERSATION(chat), silc_hash_table_list_reset(&htl);
@@ -687,9 +687,9 @@
_("<I>%s</I> removed all <I>%s's</I> modes"), name,
client_entry2->nickname);
- purple_conversation_write_system_message(PURPLE_CONVERSATION(chat), buf, 0);
+ purple_conversation_write_system_message(chat, buf, 0); purple_chat_user_set_flags(purple_chat_conversation_find_user(
- chat, client_entry2->nickname), flags);
+ PURPLE_CHAT_CONVERSATION(chat), client_entry2->nickname), flags); @@ -716,14 +716,13 @@
_("You have been kicked off <I>%s</I> by <I>%s</I> (%s)"),
channel->channel_name, client_entry2->nickname,
- purple_conversation_write_system_message(PURPLE_CONVERSATION(chat),
- purple_serv_got_chat_left(gc, purple_chat_conversation_get_id(chat));
+ purple_conversation_write_system_message(chat, buf, 0); + purple_serv_got_chat_left(gc, purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(chat))); /* Remove user from channel */
g_snprintf(buf, sizeof(buf), _("Kicked by %s (%s)"),
client_entry2->nickname, tmp ? tmp : "");
- purple_chat_conversation_remove_user(chat,
+ purple_chat_conversation_remove_user(PURPLE_CHAT_CONVERSATION(chat), @@ -761,9 +760,8 @@
chu->channel->channel_name, sg->account);
- purple_conversation_write_system_message(
- PURPLE_CONVERSATION(chat), buf, 0);
- purple_serv_got_chat_left(gc, purple_chat_conversation_get_id(chat));
+ purple_conversation_write_system_message(chat, buf, 0); + purple_serv_got_chat_left(gc, purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(chat))); silc_hash_table_list_reset(&htl);
@@ -792,7 +790,7 @@
chu->channel->channel_name, sg->account);
- purple_chat_conversation_remove_user(chat,
+ purple_chat_conversation_remove_user(PURPLE_CHAT_CONVERSATION(chat), client_entry->nickname, tmp);
silc_hash_table_list_reset(&htl);
@@ -816,7 +814,7 @@
chu->channel->channel_name, sg->account);
- purple_chat_conversation_remove_user(chat,
+ purple_chat_conversation_remove_user(PURPLE_CHAT_CONVERSATION(chat), @@ -987,13 +985,12 @@
PurpleConnection *gc = client->application;
SilcPurple sg = purple_connection_get_protocol_data(gc);
- PurpleChatConversation *chat;
+ PurpleConversation *chat; SilcChannelEntry channel;
- PurpleChatConversation *chat;
SilcHashTableList *user_list;
GList *users = NULL, *flags = NULL;
@@ -1042,21 +1039,24 @@
_("Channel founder on <I>%s</I> is <I>%s</I>"),
channel->channel_name, chu->client->nickname);
- purple_conversation_write_system_message(
- PURPLE_CONVERSATION(chat), tmp, 0);
+ purple_conversation_write_system_message(chat, tmp, 0); - purple_chat_conversation_add_users(chat, users, NULL, flags, FALSE);
+ purple_chat_conversation_add_users(PURPLE_CHAT_CONVERSATION(chat), + users, NULL, flags, FALSE);
- purple_chat_conversation_set_topic(chat, NULL, topic);
+ purple_chat_conversation_set_topic(PURPLE_CHAT_CONVERSATION(chat), - purple_chat_conversation_set_nick(chat, conn->local_entry->nickname);
+ purple_chat_conversation_set_nick(PURPLE_CHAT_CONVERSATION(chat), + conn->local_entry->nickname); @@ -1315,8 +1315,10 @@
- purple_chat_conversation_set_topic(chat, NULL, channel->topic);
+ purple_chat_conversation_set_topic(PURPLE_CHAT_CONVERSATION(chat), @@ -1344,14 +1346,14 @@
chu->channel->channel_name, sg->account);
- oldnick = purple_chat_conversation_get_nick(chat);
+ oldnick = purple_chat_conversation_get_nick(PURPLE_CHAT_CONVERSATION(chat)); if (!purple_strequal(oldnick,
- purple_normalize(purple_conversation_get_account
- (PURPLE_CONVERSATION(chat)), newnick))) {
+ purple_normalize(purple_conversation_get_account(chat), - purple_chat_conversation_rename_user(chat,
+ purple_chat_conversation_rename_user(PURPLE_CHAT_CONVERSATION(chat), - purple_chat_conversation_set_nick(chat, newnick);
+ purple_chat_conversation_set_nick(PURPLE_CHAT_CONVERSATION(chat), newnick); silc_hash_table_list_reset(&htl);
--- a/libpurple/protocols/silc/silc.c Mon May 17 20:32:56 2021 -0500
+++ b/libpurple/protocols/silc/silc.c Tue May 18 02:04:53 2021 -0500
@@ -1397,7 +1397,7 @@
PurpleConnection *gc = client->application;
SilcPurple sg = purple_connection_get_protocol_data(gc);
SilcPurpleIM im = context;
- PurpleIMConversation *convo;
+ PurpleConversation *convo; SilcClientEntry client_entry;
@@ -1445,7 +1445,7 @@
silc_mime_partial_free(list);
msg = purple_message_new_outgoing(me, conn->local_entry->nickname, im->message, 0);
- purple_conversation_write_message(PURPLE_CONVERSATION(convo), msg);
+ purple_conversation_write_message(convo, msg); g_object_unref(G_OBJECT(msg));
@@ -1455,7 +1455,7 @@
silc_client_send_private_message(client, conn, client_entry, im->flags,
sg->sha1hash, (unsigned char *)im->message, im->message_len);
msg = purple_message_new_outgoing(me, conn->local_entry->nickname, im->message, 0);
- purple_conversation_write_message(PURPLE_CONVERSATION(convo), msg);
+ purple_conversation_write_message(convo, msg); g_object_unref(G_OBJECT(msg));
@@ -1463,7 +1463,7 @@
g_snprintf(tmp, sizeof(tmp),
_("User <I>%s</I> is not present in the network"), im->nick);
purple_conversation_write_system_message(
- PURPLE_CONVERSATION(convo), tmp, 0);
@@ -1593,7 +1593,7 @@
const char *cmd, char **args, char **error, void *data)
- PurpleChatConversation *chat = PURPLE_CHAT_CONVERSATION(conv);
+ PurpleConversation *chat = conv; gc = purple_conversation_get_connection(conv);
@@ -1606,7 +1606,7 @@
purple_connection_get_account(gc));
- id = purple_chat_conversation_get_id(chat);
+ id = purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(chat)); return PURPLE_CMD_RET_FAILED;
@@ -1731,7 +1731,7 @@
const char *cmd, char **args, char **error, void *data)
- PurpleIMConversation *im;
+ PurpleConversation *im; @@ -1755,7 +1755,7 @@
me, args[0], args[1], 0);
ret = silcpurple_send_im(NULL, gc, msg);
- purple_conversation_write_message(PURPLE_CONVERSATION(im), msg);
+ purple_conversation_write_message(im, msg); g_object_unref(G_OBJECT(msg));
--- a/libpurple/protocols/zephyr/zephyr.c Mon May 17 20:32:56 2021 -0500
+++ b/libpurple/protocols/zephyr/zephyr.c Tue May 18 02:04:53 2021 -0500
@@ -311,7 +311,7 @@
GSList *l = g_slist_find_custom(zephyr->subscrips, &sub, (GCompareFunc)zephyr_triple_subset);
- PurpleChatConversation *gcc;
+ PurpleConversation *gcc; /* This is a server supplied subscription */
@@ -338,7 +338,7 @@
gcc = purple_conversations_find_chat_with_account(zt->name, purple_connection_get_account(gc));
- if (!purple_chat_conversation_has_user(gcc, stripped_sender)) {
+ if (!purple_chat_conversation_has_user(PURPLE_CHAT_CONVERSATION(gcc), stripped_sender)) { GInetAddress *inet_addr = NULL;
@@ -346,7 +346,8 @@
(const guint8 *)¬ice->z_sender_addr,
ipaddr = g_inet_address_to_string(inet_addr);
- purple_chat_conversation_add_user(gcc, stripped_sender, ipaddr,
+ purple_chat_conversation_add_user(PURPLE_CHAT_CONVERSATION(gcc), + stripped_sender, ipaddr, PURPLE_CHAT_USER_NONE, TRUE);
g_object_unref(inet_addr);
@@ -919,7 +920,7 @@
- PurpleChatConversation *gcc;
+ PurpleConversation *gcc; zephyr_account *zephyr = purple_connection_get_protocol_data(gc);
@@ -935,7 +936,7 @@
gcc = purple_conversations_find_chat_with_account(zt->name, purple_connection_get_account(gc));
- if (!(inst = (char *)purple_chat_conversation_get_topic(gcc)))
+ if (!(inst = (char *)purple_chat_conversation_get_topic(PURPLE_CHAT_CONVERSATION(gcc)))) inst = g_strdup("PERSONAL");
if (!g_ascii_strcasecmp(zt->sub.zsub_recipient, "*")) {
@@ -1349,7 +1350,7 @@
static void zephyr_chat_set_topic(PurpleConnection * gc, int id, const char *topic)
- PurpleChatConversation *gcc;
+ PurpleConversation *gcc; zephyr_account *zephyr = purple_connection_get_protocol_data(gc);
@@ -1363,7 +1364,7 @@
gcc = purple_conversations_find_chat_with_account(zt->name, purple_connection_get_account(gc));
topic_utf8 = convert_to_utf8(topic, zephyr->encoding);
- purple_chat_conversation_set_topic(gcc, zephyr->username, topic_utf8);
+ purple_chat_conversation_set_topic(PURPLE_CHAT_CONVERSATION(gcc), zephyr->username, topic_utf8); --- a/libpurple/server.c Mon May 17 20:32:56 2021 -0500
+++ b/libpurple/server.c Tue May 18 02:04:53 2021 -0500
@@ -123,7 +123,7 @@
int purple_serv_send_im(PurpleConnection *gc, PurpleMessage *msg)
- PurpleIMConversation *im = NULL;
+ PurpleConversation *im = NULL; PurpleAccount *account = NULL;
PurplePresence *presence = NULL;
PurpleProtocol *protocol = NULL;
@@ -169,8 +169,8 @@
- if(im && purple_im_conversation_get_send_typed_timeout(im))
- purple_im_conversation_stop_send_typed_timeout(im);
+ if(im && purple_im_conversation_get_send_typed_timeout(PURPLE_IM_CONVERSATION(im))) + purple_im_conversation_stop_send_typed_timeout(PURPLE_IM_CONVERSATION(im)); @@ -241,7 +241,7 @@
- PurpleIMConversation *im;
+ PurpleConversation *im; account = purple_connection_get_account(gc);
buddies = purple_blist_find_buddies(account, who);
@@ -269,7 +269,7 @@
purple_conversation_write_system_message(
- PURPLE_CONVERSATION(im), tmp,
PURPLE_MESSAGE_NO_LINKIFY);
@@ -440,7 +440,7 @@
void purple_serv_chat_invite(PurpleConnection *gc, int id, const char *message, const char *name)
PurpleProtocol *protocol = NULL;
- PurpleChatConversation *chat;
+ PurpleConversation *chat; chat = purple_conversations_find_chat(gc, id);
@@ -502,7 +502,7 @@
PurpleMessageFlags flags, time_t mtime)
- PurpleIMConversation *im;
+ PurpleConversation *im; @@ -569,7 +569,7 @@
im = purple_im_conversation_new(account, name);
pmsg = purple_message_new_incoming(name, message, flags, mtime);
- purple_conversation_write_message(PURPLE_CONVERSATION(im), pmsg);
+ purple_conversation_write_message(im, pmsg); g_object_unref(G_OBJECT(pmsg));
@@ -657,11 +657,17 @@
void purple_serv_got_typing(PurpleConnection *gc, const char *name, int timeout,
PurpleIMTypingState state) {
- PurpleIMConversation *im;
+ PurpleConversation *conv; + conv = purple_conversations_find_im_with_account(name, purple_connection_get_account(gc)); + if(PURPLE_IS_IM_CONVERSATION(conv)) { + PurpleIMConversation *im = PURPLE_IM_CONVERSATION(conv); - im = purple_conversations_find_im_with_account(name, purple_connection_get_account(gc));
purple_im_conversation_set_typing_state(im, state);
+ purple_im_conversation_start_typing_timeout(im, timeout); @@ -679,18 +685,16 @@
- if (im != NULL && timeout > 0)
- purple_im_conversation_start_typing_timeout(im, timeout);
void purple_serv_got_typing_stopped(PurpleConnection *gc, const char *name) {
- PurpleIMConversation *im;
+ PurpleConversation *conv; - im = purple_conversations_find_im_with_account(name, purple_connection_get_account(gc));
+ conv = purple_conversations_find_im_with_account(name, purple_connection_get_account(gc)); + PurpleIMConversation *im = PURPLE_IM_CONVERSATION(conv); if (purple_im_conversation_get_typing_state(im) == PURPLE_IM_NOT_TYPING)
@@ -788,10 +792,10 @@
-PurpleChatConversation *purple_serv_got_joined_chat(PurpleConnection *gc,
+PurpleConversation *purple_serv_got_joined_chat(PurpleConnection *gc, int id, const char *name)
- PurpleChatConversation *chat;
+ PurpleConversation *chat; account = purple_connection_get_account(gc);
@@ -803,9 +807,9 @@
g_return_val_if_fail(chat != NULL, NULL);
if (!g_slist_find(purple_connection_get_active_chats(gc), chat))
- _purple_connection_add_active_chat(gc, chat);
+ _purple_connection_add_active_chat(gc, PURPLE_CHAT_CONVERSATION(chat)); - purple_chat_conversation_set_id(chat, id);
+ purple_chat_conversation_set_id(PURPLE_CHAT_CONVERSATION(chat), id); purple_signal_emit(purple_conversations_get_handle(), "chat-joined", chat);