mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Moved muc error handling to profanity.c
This commit is contained in:
parent
710c49b6b8
commit
3dffc1d9ff
@ -188,6 +188,15 @@ void
|
|||||||
prof_handle_error_message(const char *from, const char *err_msg)
|
prof_handle_error_message(const char *from, const char *err_msg)
|
||||||
{
|
{
|
||||||
ui_handle_error_message(from, err_msg);
|
ui_handle_error_message(from, err_msg);
|
||||||
|
|
||||||
|
if (g_strcmp0(err_msg, "conflict") == 0) {
|
||||||
|
// remove the room from muc
|
||||||
|
Jid *room_jid = jid_create(from);
|
||||||
|
if (!muc_get_roster_received(room_jid->barejid)) {
|
||||||
|
muc_leave_room(room_jid->barejid);
|
||||||
|
}
|
||||||
|
jid_destroy(room_jid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -414,13 +414,6 @@ ui_handle_error_message(const char * const from, const char * const err_msg)
|
|||||||
} else {
|
} else {
|
||||||
cons_show_error("Error received from server: %s", err_msg);
|
cons_show_error("Error received from server: %s", err_msg);
|
||||||
}
|
}
|
||||||
// remove the room from muc
|
|
||||||
Jid *room_jid = jid_create(from);
|
|
||||||
if (!muc_get_roster_received(room_jid->barejid)) {
|
|
||||||
muc_leave_room(room_jid->barejid);
|
|
||||||
}
|
|
||||||
jid_destroy(room_jid);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
cons_show_error("Error received from server: %s", err_msg);
|
cons_show_error("Error received from server: %s", err_msg);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user