--- a/libpurple/conversationtypes.c Thu May 22 21:04:56 2014 +0200
+++ b/libpurple/conversationtypes.c Thu May 22 21:11:53 2014 +0200
@@ -803,7 +803,6 @@
chat_conversation_write_message(PurpleConversation *conv, PurpleMessage *msg)
- PurpleAccount *account;
PurpleConversationUiOps *ops;
PurpleChatConversationPrivate *priv = PURPLE_CHAT_CONVERSATION_GET_PRIVATE(conv);
PurpleMessageFlags flags;
@@ -811,8 +810,6 @@
g_return_if_fail(priv != NULL);
g_return_if_fail(msg != NULL);
- account = purple_conversation_get_account(conv);
/* Don't display this if the person who wrote it is ignored. */
if (purple_chat_conversation_is_ignored_user(
PURPLE_CHAT_CONVERSATION(conv), purple_message_get_who(msg)))
@@ -821,6 +818,7 @@
+ PurpleAccount *account = purple_conversation_get_account(conv); /* XXX: this should not be necessary */
if (purple_strequal(purple_normalize(account, who), priv->nick)) {
flags |= PURPLE_MESSAGE_SEND;
--- a/libpurple/protocols/gg/chat.c Thu May 22 21:04:56 2014 +0200
+++ b/libpurple/protocols/gg/chat.c Thu May 22 21:11:53 2014 +0200
@@ -470,8 +470,7 @@
-int ggp_chat_send(PurpleConnection *gc, int local_id, const char *message,
- PurpleMessageFlags flags)
+int ggp_chat_send(PurpleConnection *gc, int local_id, PurpleMessage *msg) GGPInfo *info = purple_connection_get_protocol_data(gc);
PurpleChatConversation *conv;
@@ -491,14 +490,18 @@
ggp_chat_get_name_from_id(chat->id),
purple_connection_get_account(gc));
- gg_msg = ggp_message_format_to_gg(PURPLE_CONVERSATION(conv), message);
+ gg_msg = ggp_message_format_to_gg(PURPLE_CONVERSATION(conv), + purple_message_get_contents(msg)); if (gg_chat_send_message(info->session, chat->id, gg_msg, TRUE) < 0)
me = purple_account_get_username(purple_connection_get_account(gc));
- purple_serv_got_chat_in(gc, chat->local_id, me, flags, message, time(NULL));
+ purple_serv_got_chat_in(gc, chat->local_id, me, + purple_message_get_flags(msg), + purple_message_get_contents(msg), + purple_message_get_time(msg)); --- a/libpurple/protocols/gg/chat.h Thu May 22 21:04:56 2014 +0200
+++ b/libpurple/protocols/gg/chat.h Thu May 22 21:11:53 2014 +0200
@@ -49,8 +49,7 @@
void ggp_chat_leave(PurpleConnection *gc, int local_id);
void ggp_chat_invite(PurpleConnection *gc, int local_id, const char *message,
-int ggp_chat_send(PurpleConnection *gc, int local_id, const char *message,
- PurpleMessageFlags flags);
+int ggp_chat_send(PurpleConnection *gc, int local_id, PurpleMessage *msg); void ggp_chat_got_message(PurpleConnection *gc, uint64_t chat_id,
const char *message, time_t time, uin_t who);