1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04: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:
Michael Vetter 2020-01-23 11:35:33 +01:00
parent d4c27f2f78
commit 3066fd77fc
3 changed files with 6 additions and 0 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;
}