1
1
mirror of https://github.com/profanity-im/profanity.git synced 2025-01-03 14:57:42 -05:00

Moved chat_session_set_sent from message.c module

This commit is contained in:
James Booth 2014-12-29 00:31:57 +00:00
parent fe2ef44cac
commit 4be06c0ae2
3 changed files with 7 additions and 4 deletions

View File

@ -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);
}
}
}

View File

@ -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);
}
}

View File

@ -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