Software /
code /
prosody-modules
Comparison
mod_storage_xmlarchive/mod_storage_xmlarchive.lua @ 2675:101a2a0b8b33
mod_storage_xmlarchive: Pass username to dates
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 10 Apr 2017 08:59:13 +0200 |
parent | 2663:6e8c3fc48237 |
child | 2676:1b081c8fc1d9 |
comparison
equal
deleted
inserted
replaced
2674:c971b2cee2cc | 2675:101a2a0b8b33 |
---|---|
89 end | 89 end |
90 | 90 |
91 local stream_session = { notopen = true }; | 91 local stream_session = { notopen = true }; |
92 local stream_callbacks = { handlestanza = cb, stream_ns = "jabber:client", default_ns = "jabber:client" }; | 92 local stream_callbacks = { handlestanza = cb, stream_ns = "jabber:client", default_ns = "jabber:client" }; |
93 local stream = new_stream(stream_session, stream_callbacks); | 93 local stream = new_stream(stream_session, stream_callbacks); |
94 local dates = self:dates() or empty; | 94 local dates = self:dates(username) or empty; |
95 local function reset_stream() | 95 local function reset_stream() |
96 stream:reset(); | 96 stream:reset(); |
97 stream_session.notopen = true; | 97 stream_session.notopen = true; |
98 stream:feed(st.stanza("stream", { xmlns = "jabber:client" }):top_tag()); | 98 stream:feed(st.stanza("stream", { xmlns = "jabber:client" }):top_tag()); |
99 stream_session.notopen = nil; | 99 stream_session.notopen = nil; |