1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-29 19:56:07 -04:00

Treat room presence as online

Needs to be changed to show status changes
This commit is contained in:
James Booth 2012-11-14 01:16:07 +00:00
parent de2f060742
commit a970ea49cd
2 changed files with 14 additions and 5 deletions

View File

@ -741,8 +741,8 @@ _room_presence_handler(const char * const jid, xmpp_stanza_t * const stanza)
show_str = xmpp_stanza_get_text(show);
} else {
show_str = "online";
prof_handle_room_member_online(room, nick, show_str, status_str);
}
prof_handle_room_member_online(room, nick, show_str, status_str);
}
}
}

View File

@ -237,22 +237,31 @@ win_show_wins(void)
for (i = 1; i < NUM_WINS; i++) {
if (_wins[i].type != WIN_UNUSED) {
_win_show_time(_cons_win);
wprintw(_cons_win, "[%d] - ", i + 1);
switch (_wins[i].type)
{
case WIN_CHAT:
wprintw(_cons_win, "conversation : %s\n", _wins[i].from);
wprintw(_cons_win, "[%d] - ", i + 1);
wprintw(_cons_win, "conversation : %s", _wins[i].from);
PContact contact = contact_list_get_contact(_wins[i].from);
if (p_contact_name(contact) != NULL) {
wprintw(_cons_win, " (%s)", p_contact_name(contact));
}
wprintw(_cons_win, ", %s", p_contact_presence(contact));
break;
case WIN_PRIVATE:
wprintw(_cons_win, "private : %s\n", _wins[i].from);
wprintw(_cons_win, "[%d] - ", i + 1);
wprintw(_cons_win, "private : %s", _wins[i].from);
break;
case WIN_MUC:
wprintw(_cons_win, "chat room : %s\n", _wins[i].from);
wprintw(_cons_win, "[%d] - ", i + 1);
wprintw(_cons_win, "chat room : %s", _wins[i].from);
break;
default:
break;
}
wprintw(_cons_win, "\n");
}
}
}