--- a/src/spasm-chat.c Thu May 14 03:54:05 2020 -0500
+++ b/src/spasm-chat.c Thu Jun 18 04:39:11 2020 -0500
@@ -38,7 +38,6 @@
GDataInputStream *input_stream;
- gint id; /* used to track ids for this service */
@@ -174,12 +173,14 @@
if(purple_utf8_strcasecmp(nick, purple_account_get_username(account)) == 0) {
PurpleConnection *connection = spasm_account_get_connection(chat->sa);
+ gchar *lower = g_utf8_casefold(target, -1); /* We initiated the join. */
- serv_got_joined_chat(connection, chat->id++, target);
+ serv_got_joined_chat(connection, g_str_hash(lower), lower); @@ -647,15 +648,25 @@
- SpasmChatService *chat = NULL;
+ PurpleConversation *conv = NULL; const gchar *channel = NULL;
channel = g_hash_table_lookup(components, "channel");
+ lower = g_utf8_casefold(channel, -1); sa = purple_connection_get_protocol_data(connection);
- chat = spasm_account_get_chat_service(sa);
- spasm_chat_service_real_send(chat, "JOIN #%s", channel);
+ conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, lower, + spasm_account_get_account(sa)); + SpasmChatService *chat = NULL; + chat = spasm_account_get_chat_service(sa); + spasm_chat_service_real_send(chat, "JOIN #%s", lower);