Show role/affiliation on room join and on change
This commit is contained in:
@@ -677,6 +677,10 @@ handle_muc_self_online(const char * const room, const char * const nick, gboolea
|
||||
const char * const status)
|
||||
{
|
||||
muc_roster_add(room, nick, jid, role, affiliation, show, status);
|
||||
char *old_role = muc_role_str(room);
|
||||
char *old_affiliation = muc_affiliation_str(room);
|
||||
muc_set_role(room, role);
|
||||
muc_set_affiliation(room, affiliation);
|
||||
|
||||
// handle self nick change
|
||||
if (muc_nick_change_pending(room)) {
|
||||
@@ -718,10 +722,16 @@ handle_muc_self_online(const char * const room, const char * const nick, gboolea
|
||||
muc_set_requires_config(room, TRUE);
|
||||
ui_room_requires_config(room);
|
||||
}
|
||||
}
|
||||
|
||||
muc_set_role(room, role);
|
||||
muc_set_affiliation(room, affiliation);
|
||||
// check for change in role/affiliation
|
||||
} else {
|
||||
if (g_strcmp0(role, old_role) != 0) {
|
||||
ui_room_role_change(room, role);
|
||||
}
|
||||
if (g_strcmp0(affiliation, old_affiliation) != 0) {
|
||||
ui_room_affiliation_change(room, affiliation);
|
||||
}
|
||||
}
|
||||
|
||||
ui_muc_roster(room);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user