mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-25 21:16:21 +00:00
Use Jid datatype in chat rooms
This commit is contained in:
@@ -753,13 +753,16 @@ win_show_outgoing_msg(const char * const from, const char * const to,
|
||||
|
||||
// create new window
|
||||
if (win_index == NUM_WINS) {
|
||||
Jid *jid = jid_create(to);
|
||||
|
||||
if (muc_room_is_active(to)) {
|
||||
if (muc_room_is_active(jid)) {
|
||||
win_index = _new_prof_win(to, WIN_PRIVATE);
|
||||
} else {
|
||||
win_index = _new_prof_win(to, WIN_CHAT);
|
||||
}
|
||||
|
||||
jid_destroy(jid);
|
||||
|
||||
win = windows[win_index]->win;
|
||||
|
||||
if (prefs_get_chlog() && prefs_get_history()) {
|
||||
@@ -794,13 +797,13 @@ win_show_outgoing_msg(const char * const from, const char * const to,
|
||||
}
|
||||
|
||||
void
|
||||
win_join_chat(const char * const room, const char * const nick)
|
||||
win_join_chat(Jid *jid)
|
||||
{
|
||||
int win_index = _find_prof_win_index(room);
|
||||
int win_index = _find_prof_win_index(jid->barejid);
|
||||
|
||||
// create new window
|
||||
if (win_index == NUM_WINS) {
|
||||
win_index = _new_prof_win(room, WIN_MUC);
|
||||
win_index = _new_prof_win(jid->barejid, WIN_MUC);
|
||||
}
|
||||
|
||||
ui_switch_win(win_index);
|
||||
|
||||
Reference in New Issue
Block a user