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:
@@ -165,6 +165,7 @@ typedef struct prof_chat_win_t {
|
|||||||
typedef struct prof_muc_win_t {
|
typedef struct prof_muc_win_t {
|
||||||
ProfWin window;
|
ProfWin window;
|
||||||
char *roomjid;
|
char *roomjid;
|
||||||
|
char *room_name;
|
||||||
int unread;
|
int unread;
|
||||||
gboolean unread_mentions;
|
gboolean unread_mentions;
|
||||||
gboolean unread_triggers;
|
gboolean unread_triggers;
|
||||||
|
|||||||
@@ -493,6 +493,7 @@ win_free(ProfWin* window)
|
|||||||
{
|
{
|
||||||
ProfMucWin *mucwin = (ProfMucWin*)window;
|
ProfMucWin *mucwin = (ProfMucWin*)window;
|
||||||
free(mucwin->roomjid);
|
free(mucwin->roomjid);
|
||||||
|
free(mucwin->room_name);
|
||||||
free(mucwin->enctext);
|
free(mucwin->enctext);
|
||||||
free(mucwin->message_char);
|
free(mucwin->message_char);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -2077,6 +2077,10 @@ _room_info_response_id_handler(xmpp_stanza_t *const stanza, void *const userdata
|
|||||||
|
|
||||||
if (name) {
|
if (name) {
|
||||||
identity->name = strdup(name);
|
identity->name = strdup(name);
|
||||||
|
ProfMucWin *mucwin = wins_get_muc(cb_data->room);
|
||||||
|
if (mucwin) {
|
||||||
|
mucwin->room_name = strdup(name);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
identity->name = NULL;
|
identity->name = NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user