mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-25 20:36:22 +00:00
Moved chat states out of xmpp module for message send chat
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
#include "contact.h"
|
||||
#include "ui/ui.h"
|
||||
#include "config/preferences.h"
|
||||
#include "chat_session.h"
|
||||
|
||||
#define PRESENCE_ONLINE 1
|
||||
#define PRESENCE_OFFLINE 0
|
||||
@@ -109,7 +110,17 @@ static void
|
||||
cb_inject_message(void *opdata, const char *accountname,
|
||||
const char *protocol, const char *recipient, const char *message)
|
||||
{
|
||||
message_send_chat(recipient, message);
|
||||
gboolean send_state = FALSE;
|
||||
if (prefs_get_boolean(PREF_STATES)) {
|
||||
if (!chat_session_exists(recipient)) {
|
||||
chat_session_start(recipient, TRUE);
|
||||
}
|
||||
if (chat_session_get_recipient_supports(recipient)) {
|
||||
chat_session_set_active(recipient);
|
||||
send_state = TRUE;
|
||||
}
|
||||
}
|
||||
message_send_chat(recipient, NULL, message, send_state);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user