Software / code / verse
Comparison
plugins/smacks.lua @ 446:62fb547bd31a
plugins.smacks: Convert counter to string in resumption
Fixes traceback due to stricter stanza API
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 10 Jun 2021 14:16:19 +0200 |
| parent | 445:b119dc4d8bc2 |
| child | 448:6d97b42bb1b4 |
comparison
equal
deleted
inserted
replaced
| 445:b119dc4d8bc2 | 446:62fb547bd31a |
|---|---|
| 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 |