mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-26 01:36:21 +00:00
Handle chat history from groupchat
This commit is contained in:
@@ -508,6 +508,26 @@ win_show_chat_room_member(const char * const room_jid, const char * const nick)
|
||||
dirty = TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
win_show_room_history(const char * const room_jid, const char * const nick,
|
||||
GTimeVal tv_stamp, const char * const message)
|
||||
{
|
||||
int win_index = _find_prof_win_index(room_jid);
|
||||
WINDOW *win = _wins[win_index].win;
|
||||
|
||||
GDateTime *time = g_date_time_new_from_timeval_utc(&tv_stamp);
|
||||
gchar *date_fmt = g_date_time_format(time, "%H:%M:%S");
|
||||
wprintw(win, "%s - ", date_fmt);
|
||||
g_date_time_unref(time);
|
||||
g_free(date_fmt);
|
||||
|
||||
wprintw(win, "%s: ", nick);
|
||||
_win_show_message(win, message);
|
||||
|
||||
if (win_index == _curr_prof_win)
|
||||
dirty = TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
win_show(const char * const msg)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user