mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-24 00:26:21 +00:00
Merge pull request #1892 from ike08/improvement/muc-title-behaviour
Improve MUC title behaviour for roster, statusbar, and titlebar
This commit is contained in:
@@ -2146,11 +2146,7 @@ _room_info_response_id_handler(xmpp_stanza_t* const stanza, void* const userdata
|
||||
if (identity) {
|
||||
if (name) {
|
||||
identity->name = strdup(name);
|
||||
ProfMucWin* mucwin = wins_get_muc(cb_data->room);
|
||||
if (mucwin) {
|
||||
free(mucwin->room_name);
|
||||
mucwin->room_name = strdup(name);
|
||||
}
|
||||
mucwin_set_room_name(cb_data->room, name);
|
||||
} else {
|
||||
identity->name = NULL;
|
||||
}
|
||||
|
||||
@@ -995,13 +995,7 @@ _room_config_handler(xmpp_stanza_t* const stanza, void* const userdata)
|
||||
xmpp_stanza_t* query = xmpp_stanza_get_child_by_name(stanza, STANZA_NAME_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);
|
||||
|
||||
// Update features
|
||||
if (mucwin_set_room_name(from, capabilities->identity->name)) {
|
||||
muc_set_features(from, capabilities->features);
|
||||
}
|
||||
caps_destroy(capabilities);
|
||||
|
||||
Reference in New Issue
Block a user