128 if features:get_child("sm", xmlns_sm) then |
128 if features:get_child("sm", xmlns_sm) then |
129 stream.stream_management_supported = true; |
129 stream.stream_management_supported = true; |
130 if stream.smacks and stream.bound then -- Already enabled in a previous session - resume |
130 if stream.smacks and stream.bound then -- Already enabled in a previous session - resume |
131 stream:debug("Resuming stream with %d handled stanzas", handled_stanza_count); |
131 stream:debug("Resuming stream with %d handled stanzas", handled_stanza_count); |
132 stream:send(verse.stanza("resume", { xmlns = xmlns_sm, |
132 stream:send(verse.stanza("resume", { xmlns = xmlns_sm, |
133 h = handled_stanza_count, previd = stream.resumption_token })); |
133 h = tostring(handled_stanza_count), previd = stream.resumption_token })); |
134 return true; |
134 return true; |
135 else |
135 else |
136 stream:hook("bind-success", on_bind_success, 1); |
136 stream:hook("bind-success", on_bind_success, 1); |
137 end |
137 end |
138 end |
138 end |