mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Added chat_session_on_incoming_message
This commit is contained in:
parent
671ee0b876
commit
fe2ef44cac
@ -277,6 +277,16 @@ chat_session_on_message_send(const char * const barejid)
|
|||||||
return send_state;
|
return send_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
chat_session_on_incoming_message(const char * const barejid, gboolean recipient_supports)
|
||||||
|
{
|
||||||
|
if (!chat_session_exists(barejid)) {
|
||||||
|
chat_session_new(barejid, recipient_supports);
|
||||||
|
} else {
|
||||||
|
chat_session_set_recipient_supports(barejid, recipient_supports);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
chat_session_on_window_open(const char * const barejid)
|
chat_session_on_window_open(const char * const barejid)
|
||||||
{
|
{
|
||||||
|
@ -58,5 +58,6 @@ void chat_session_set_sent(const char * const recipient);
|
|||||||
gboolean chat_session_get_sent(const char * const recipient);
|
gboolean chat_session_get_sent(const char * const recipient);
|
||||||
gboolean chat_session_on_message_send(const char * const barejid);
|
gboolean chat_session_on_message_send(const char * const barejid);
|
||||||
void chat_session_on_window_open(const char * const barejid);
|
void chat_session_on_window_open(const char * const barejid);
|
||||||
|
void chat_session_on_incoming_message(const char * const barejid, gboolean recipient_supports);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -459,11 +459,7 @@ _chat_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create or update chat session
|
// create or update chat session
|
||||||
if (!chat_session_exists(jid->barejid)) {
|
chat_session_on_incoming_message(jid->barejid, recipient_supports);
|
||||||
chat_session_new(jid->barejid, recipient_supports);
|
|
||||||
} else {
|
|
||||||
chat_session_set_recipient_supports(jid->barejid, recipient_supports);
|
|
||||||
}
|
|
||||||
|
|
||||||
// determine if the notifications happened whilst offline
|
// determine if the notifications happened whilst offline
|
||||||
GTimeVal tv_stamp;
|
GTimeVal tv_stamp;
|
||||||
|
Loading…
Reference in New Issue
Block a user