1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-10-27 20:30:13 -04:00

Merge pull request #1711 from MarcoPolo-PasTonMolo/fix/roomname-update

Fix room name not updating.
This commit is contained in:
Michael Vetter 2022-05-23 08:02:04 +02:00 committed by GitHub
commit b4523d6c42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -891,6 +891,14 @@ _caps_response_id_handler(xmpp_stanza_t* const stanza, void* const userdata)
} else { } else {
log_debug("Capabilities not cached: %s, storing", given_sha1); log_debug("Capabilities not cached: %s, storing", given_sha1);
EntityCapabilities* capabilities = stanza_create_caps_from_query_element(query); EntityCapabilities* capabilities = stanza_create_caps_from_query_element(query);
// Update window name
ProfMucWin* win = wins_get_muc(from);
if (win != NULL) {
free(win->room_name);
win->room_name = strdup(capabilities->identity->name);
}
caps_add_by_ver(given_sha1, capabilities); caps_add_by_ver(given_sha1, capabilities);
caps_destroy(capabilities); caps_destroy(capabilities);
} }