mirror of
https://github.com/profanity-im/profanity.git
synced 2024-09-01 19:24:15 -04:00
Merge pull request #1869 from profanity-im/fix/1868-mam
Fix crash if we don't get `first` stanza during RSM
This commit is contained in:
commit
69d8c1f96e
@ -135,6 +135,16 @@
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
|
||||
<!-- XEP-0059: Result Set Management -->
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
<xmpp:xep rdf:resource='https://xmpp.org/extensions/xep-0059.html'/>
|
||||
<xmpp:status>complete</xmpp:status>
|
||||
<xmpp:version>1.0</xmpp:version>
|
||||
<xmpp:since>DEV</xmpp:since>
|
||||
</xmpp:SupportedXep>
|
||||
</implements>
|
||||
|
||||
<!-- XEP-0060: Publish-Subscribe -->
|
||||
<implements>
|
||||
<xmpp:SupportedXep>
|
||||
|
@ -2738,6 +2738,7 @@ _mam_rsm_id_handler(xmpp_stanza_t* const stanza, void* const userdata)
|
||||
|
||||
auto_char char* firstid = NULL;
|
||||
xmpp_stanza_t* first = xmpp_stanza_get_child_by_name(set, STANZA_NAME_FIRST);
|
||||
if (first) {
|
||||
firstid = xmpp_stanza_get_text(first);
|
||||
|
||||
// 4.3.2. send same stanza with set,max stanza
|
||||
@ -2764,6 +2765,7 @@ _mam_rsm_id_handler(xmpp_stanza_t* const stanza, void* const userdata)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user