Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EionRobb/skype4pidgin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Drewniak <kdrewniak@fb.com>2015-07-31 03:10:44 +0300
committerKrzysztof Drewniak <kdrewniak@fb.com>2015-07-31 03:10:44 +0300
commit619e2ca6c7d681884da698c83d2dd63ed7c25207 (patch)
treed44b0d26b72857f7c5a82efe1c91b094eac2210d
parentaab15d600357e185d2848a22b68b3a8bb078f7c1 (diff)
Fix an issue where a chat was joined but messages couldn't be sent
The message sending code expected a "chatname" attribute to be set on chats to which message were sent. When the chat-joined event fired, this attribute was not set. This caused sending messages from a chat-joined callback to fail. This commit fixes this issue by attempting to fall back to the name field on the conversation if the "chatname" attribute is not set.
-rw-r--r--skypeweb/skypeweb_messages.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/skypeweb/skypeweb_messages.c b/skypeweb/skypeweb_messages.c
index 4a95c25..21a5690 100644
--- a/skypeweb/skypeweb_messages.c
+++ b/skypeweb/skypeweb_messages.c
@@ -1074,8 +1074,12 @@ skypeweb_chat_send(PurpleConnection *pc, gint id, const gchar *message, PurpleMe
chatconv = purple_conversations_find_chat(pc, id);
chatname = purple_conversation_get_data(PURPLE_CONVERSATION(chatconv), "chatname");
- if (!chatname)
- return -1;
+ if (!chatname) {
+ // Fix for a condition around the chat data and serv_got_joined_chat()
+ chatname = purple_conversation_get_name(PURPLE_CONVERSATION(chatconv));
+ if (!chatname)
+ return -1;
+ }
skypeweb_send_message(sa, chatname, message);