mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-30 07:16:21 +00:00
Create sha-1 of own capabilities once
This commit is contained in:
@@ -1198,14 +1198,13 @@ stanza_attach_caps(xmpp_ctx_t * const ctx, xmpp_stanza_t * const presence)
|
||||
xmpp_stanza_set_ns(caps, STANZA_NS_CAPS);
|
||||
xmpp_stanza_t *query = caps_create_query_response_stanza(ctx);
|
||||
|
||||
char *sha1 = caps_create_sha1_str(query);
|
||||
char *sha1 = caps_get_my_sha1(ctx);
|
||||
xmpp_stanza_set_attribute(caps, STANZA_ATTR_HASH, "sha-1");
|
||||
xmpp_stanza_set_attribute(caps, STANZA_ATTR_NODE, "http://www.profanity.im");
|
||||
xmpp_stanza_set_attribute(caps, STANZA_ATTR_VER, sha1);
|
||||
xmpp_stanza_add_child(presence, caps);
|
||||
xmpp_stanza_release(caps);
|
||||
xmpp_stanza_release(query);
|
||||
g_free(sha1);
|
||||
}
|
||||
|
||||
const char *
|
||||
|
||||
Reference in New Issue
Block a user