mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 20:26:21 +00:00
Moved muc error handling to profanity.c
This commit is contained in:
@@ -188,6 +188,15 @@ void
|
||||
prof_handle_error_message(const char *from, const char *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
|
||||
|
||||
@@ -414,13 +414,6 @@ ui_handle_error_message(const char * const from, const char * const err_msg)
|
||||
} else {
|
||||
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 {
|
||||
cons_show_error("Error received from server: %s", err_msg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user