diff options
author | James Booth <boothj5@gmail.com> | 2014-12-29 00:31:57 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-12-29 00:31:57 +0000 |
commit | 4be06c0ae270ad8a04abba85ef3c608527a29d2c (patch) | |
tree | 9139b4cc312175d94638ac951d83a717fcf675b6 /src | |
parent | fe2ef44cacc0be828ad74d829ec76f44aa30a512 (diff) | |
download | profani-tty-4be06c0ae270ad8a04abba85ef3c608527a29d2c.tar.gz |
Moved chat_session_set_sent from message.c module
Diffstat (limited to 'src')
-rw-r--r-- | src/profanity.c | 5 | ||||
-rw-r--r-- | src/ui/core.c | 2 | ||||
-rw-r--r-- | src/xmpp/message.c | 4 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/profanity.c b/src/profanity.c index bb7036fe..eae08828 100644 --- a/src/profanity.c +++ b/src/profanity.c @@ -137,6 +137,7 @@ prof_handle_idle(void) { jabber_conn_status_t status = jabber_get_connection_status(); if (status == JABBER_CONNECTED) { + // TODO get chat only recipients GSList *recipients = ui_get_recipients(); GSList *curr = recipients; @@ -148,13 +149,16 @@ prof_handle_idle(void) if (chat_session_is_gone(recipient) && !chat_session_get_sent(recipient)) { message_send_gone(recipient); + chat_session_set_sent(recipient); } else if (chat_session_is_inactive(recipient) && !chat_session_get_sent(recipient)) { message_send_inactive(recipient); + chat_session_set_sent(recipient); } else if (prefs_get_boolean(PREF_OUTTYPE) && chat_session_is_paused(recipient) && !chat_session_get_sent(recipient)) { message_send_paused(recipient); + chat_session_set_sent(recipient); } } @@ -180,6 +184,7 @@ prof_handle_activity(void) if (!chat_session_get_sent(chatwin->barejid) || chat_session_is_paused(chatwin->barejid)) { message_send_composing(chatwin->barejid); + chat_session_set_sent(chatwin->barejid); } } } diff --git a/src/ui/core.c b/src/ui/core.c index dd20bba8..e7264435 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -710,6 +710,7 @@ ui_close_connected_win(int index) if (chat_session_get_recipient_supports(chatwin->barejid)) { chat_session_set_gone(chatwin->barejid); message_send_gone(chatwin->barejid); + chat_session_set_sent(chatwin->barejid); chat_session_end(chatwin->barejid); } } @@ -1175,6 +1176,7 @@ ui_prune_wins(void) if (chat_session_get_recipient_supports(chatwin->barejid)) { chat_session_set_gone(chatwin->barejid); message_send_gone(chatwin->barejid); + chat_session_set_sent(chatwin->barejid); chat_session_end(chatwin->barejid); } } diff --git a/src/xmpp/message.c b/src/xmpp/message.c index 35a4ae05..0b40b979 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -158,7 +158,6 @@ message_send_composing(const char * const barejid) xmpp_send(conn, stanza); xmpp_stanza_release(stanza); - chat_session_set_sent(barejid); } void @@ -171,7 +170,6 @@ message_send_paused(const char * const barejid) xmpp_send(conn, stanza); xmpp_stanza_release(stanza); - chat_session_set_sent(barejid); } void @@ -184,7 +182,6 @@ message_send_inactive(const char * const barejid) xmpp_send(conn, stanza); xmpp_stanza_release(stanza); - chat_session_set_sent(barejid); } void @@ -197,7 +194,6 @@ message_send_gone(const char * const barejid) xmpp_send(conn, stanza); xmpp_stanza_release(stanza); - chat_session_set_sent(barejid); } static int |