1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04:00

Merge pull request #1248 from svensp/master

OMEMO message keys allow prekey="1" alongside prekey="true"
This commit is contained in:
Michael Vetter 2020-01-05 18:56:35 +01:00 committed by GitHub
commit 33fca40b58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -359,7 +359,9 @@ omemo_receive_message(xmpp_stanza_t *const stanza, gboolean *trusted)
key->data = g_base64_decode(key_text, &key->length);
free(key_text);
key->prekey = g_strcmp0(xmpp_stanza_get_attribute(key_stanza, "prekey"), "true") == 0;
key->prekey =
g_strcmp0(xmpp_stanza_get_attribute(key_stanza, "prekey"), "true") == 0
|| g_strcmp0(xmpp_stanza_get_attribute(key_stanza, "prekey"), "1") == 0;
keys = g_list_append(keys, key);
continue;