mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Moved idle time check for last activity
This commit is contained in:
parent
85764ddb53
commit
aae526fbde
@ -243,7 +243,9 @@ presence_send(const resource_presence_t presence_type, const char * const msg, c
|
||||
}
|
||||
|
||||
stanza_attach_priority(ctx, presence, pri);
|
||||
if (idle > 0) {
|
||||
stanza_attach_last_activity(ctx, presence, idle);
|
||||
}
|
||||
stanza_attach_caps(ctx, presence);
|
||||
xmpp_send(conn, presence);
|
||||
_send_room_presence(conn, presence);
|
||||
|
@ -1662,7 +1662,6 @@ void
|
||||
stanza_attach_last_activity(xmpp_ctx_t * const ctx,
|
||||
xmpp_stanza_t * const presence, const int idle)
|
||||
{
|
||||
if (idle > 0) {
|
||||
xmpp_stanza_t *query = xmpp_stanza_new(ctx);
|
||||
xmpp_stanza_set_name(query, STANZA_NAME_QUERY);
|
||||
xmpp_stanza_set_ns(query, STANZA_NS_LASTACTIVITY);
|
||||
@ -1672,7 +1671,6 @@ stanza_attach_last_activity(xmpp_ctx_t * const ctx,
|
||||
xmpp_stanza_add_child(presence, query);
|
||||
xmpp_stanza_release(query);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
stanza_attach_caps(xmpp_ctx_t * const ctx, xmpp_stanza_t * const presence)
|
||||
|
Loading…
Reference in New Issue
Block a user