diff options
author | Marius Halden <marius.h@lden.org> | 2016-09-25 10:23:43 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2016-09-25 10:23:43 +0200 |
commit | 74046d6eafd13aacf6c564d83de6560a8afbf4c2 (patch) | |
tree | 21dd4cde9531d4423ea5b8ff4da532c24465eb52 | |
parent | 99c15884fe482c099cd3a152497636df9d0b31f1 (diff) | |
parent | 1a8875ffaae873853fd8537cdce43e35e9889266 (diff) |
Merge branch 'master' into patched-master
-rw-r--r-- | protocols/purple/purple.c | 6 | ||||
-rw-r--r-- | protocols/twitter/twitter_lib.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/protocols/purple/purple.c b/protocols/purple/purple.c index d87880b3..f71cade2 100644 --- a/protocols/purple/purple.c +++ b/protocols/purple/purple.c @@ -736,6 +736,7 @@ struct groupchat *purple_chat_join(struct im_connection *ic, const char *room, c PurplePluginProtocolInfo *pi = prpl->info->extra_info; GHashTable *chat_hash; PurpleConversation *conv; + struct groupchat *gc; GList *info, *l; if (!pi->chat_info || !pi->chat_info_defaults || @@ -769,11 +770,14 @@ struct groupchat *purple_chat_join(struct im_connection *ic, const char *room, c g_list_free(info); + /* do this before serv_join_chat to handle cases where prplcb_conv_new is called immediately (not async) */ + gc = imcb_chat_new(ic, room); + serv_join_chat(purple_account_get_connection(pd->account), chat_hash); g_hash_table_destroy(chat_hash); - return imcb_chat_new(ic, room); + return gc; } void purple_chat_list(struct im_connection *ic, const char *server) diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c index 8cd12055..f06722cb 100644 --- a/protocols/twitter/twitter_lib.c +++ b/protocols/twitter/twitter_lib.c @@ -1071,7 +1071,6 @@ static void twitter_http_stream(struct http_request *req) return; } - ic->flags |= OPT_PONGED; td = ic->proto_data; if ((req->flags & HTTPC_EOF) || !req->reply_body) { @@ -1104,6 +1103,10 @@ static void twitter_http_stream(struct http_request *req) return; } + if (req == td->stream) { + ic->flags |= OPT_PONGED; + } + /* MUST search for CRLF, not just LF: https://dev.twitter.com/docs/streaming-apis/processing#Parsing_responses */ if (!(nl = strstr(req->reply_body, "\r\n"))) { |