--- a/libpurple/protocols/jabber/jabber.c Mon Jun 14 23:02:24 2021 -0500
+++ b/libpurple/protocols/jabber/jabber.c Thu Jun 17 20:54:12 2021 -0500
@@ -178,6 +178,9 @@
+ if (js->sm_state == SM_PLANNED) { @@ -319,7 +322,7 @@
if (xmlnode_get_child_with_namespace(packet, "sm", NS_STREAM_MANAGEMENT)
&& (js->sm_state == SM_DISABLED) )
+ js->sm_state = SM_PLANNED; --- a/libpurple/protocols/jabber/jabber.h Mon Jun 14 23:02:24 2021 -0500
+++ b/libpurple/protocols/jabber/jabber.h Thu Jun 17 20:54:12 2021 -0500
@@ -100,6 +100,7 @@
} JabberStreamManagementState;
--- a/libpurple/protocols/jabber/stream_management.c Mon Jun 14 23:02:24 2021 -0500
+++ b/libpurple/protocols/jabber/stream_management.c Thu Jun 17 20:54:12 2021 -0500
@@ -184,7 +184,8 @@
jabber_sm_outbound(JabberStream *js, xmlnode *packet)
- if (jabber_is_stanza(packet) && js->sm_state != SM_DISABLED) {
+ if (jabber_is_stanza(packet) + && (js->sm_state == SM_REQUESTED || js->sm_state == SM_ENABLED)) { /* Counting stanzas even if there's no confirmation that SM is
enabled yet, so that we won't miss any. */