mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Save MUC room name in ProfMucWin
We will need this if we want to display the Name instead of the JID.
This commit is contained in:
parent
d4c27f2f78
commit
3066fd77fc
@ -165,6 +165,7 @@ typedef struct prof_chat_win_t {
|
||||
typedef struct prof_muc_win_t {
|
||||
ProfWin window;
|
||||
char *roomjid;
|
||||
char *room_name;
|
||||
int unread;
|
||||
gboolean unread_mentions;
|
||||
gboolean unread_triggers;
|
||||
|
@ -493,6 +493,7 @@ win_free(ProfWin* window)
|
||||
{
|
||||
ProfMucWin *mucwin = (ProfMucWin*)window;
|
||||
free(mucwin->roomjid);
|
||||
free(mucwin->room_name);
|
||||
free(mucwin->enctext);
|
||||
free(mucwin->message_char);
|
||||
break;
|
||||
|
@ -2077,6 +2077,10 @@ _room_info_response_id_handler(xmpp_stanza_t *const stanza, void *const userdata
|
||||
|
||||
if (name) {
|
||||
identity->name = strdup(name);
|
||||
ProfMucWin *mucwin = wins_get_muc(cb_data->room);
|
||||
if (mucwin) {
|
||||
mucwin->room_name = strdup(name);
|
||||
}
|
||||
} else {
|
||||
identity->name = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user