mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-20 02:36:21 +00:00
Added cl_ev_presence_send
This commit is contained in:
@@ -63,6 +63,7 @@
|
||||
#include "xmpp/xmpp.h"
|
||||
#include "ui/ui.h"
|
||||
#include "ui/windows.h"
|
||||
#include "event/client_events.h"
|
||||
|
||||
static void _check_autoaway(void);
|
||||
static void _init(const int disable_tls, char *log_level);
|
||||
@@ -172,12 +173,12 @@ _check_autoaway()
|
||||
|
||||
// handle away mode
|
||||
if (strcmp(pref_autoaway_mode, "away") == 0) {
|
||||
presence_send(RESOURCE_AWAY, pref_autoaway_message, 0);
|
||||
cl_ev_presence_send(RESOURCE_AWAY, pref_autoaway_message, 0);
|
||||
ui_auto_away();
|
||||
|
||||
// handle idle mode
|
||||
} else if (strcmp(pref_autoaway_mode, "idle") == 0) {
|
||||
presence_send(RESOURCE_ONLINE, pref_autoaway_message, idle_ms / 1000);
|
||||
cl_ev_presence_send(RESOURCE_ONLINE, pref_autoaway_message, idle_ms / 1000);
|
||||
}
|
||||
|
||||
prefs_free_string(pref_autoaway_message);
|
||||
@@ -191,10 +192,10 @@ _check_autoaway()
|
||||
// handle check
|
||||
if (prefs_get_boolean(PREF_AUTOAWAY_CHECK)) {
|
||||
if (strcmp(pref_autoaway_mode, "away") == 0) {
|
||||
presence_send(RESOURCE_ONLINE, NULL, 0);
|
||||
cl_ev_presence_send(RESOURCE_ONLINE, NULL, 0);
|
||||
ui_end_auto_away();
|
||||
} else if (strcmp(pref_autoaway_mode, "idle") == 0) {
|
||||
presence_send(RESOURCE_ONLINE, NULL, 0);
|
||||
cl_ev_presence_send(RESOURCE_ONLINE, NULL, 0);
|
||||
ui_titlebar_presence(CONTACT_ONLINE);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user