Mercurial > prosody-hg
comparison util/xmppstream.lua @ 11358:ebbf8dca33d2
util.xmppstream: Ensure stream 'id' is always present (fix #1626)
Backout c2d144d3f8dd
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 03 Feb 2021 16:14:43 +0100 |
| parents | 1266a63ba567 |
| children | 83822be7704d |
comparison
equal
deleted
inserted
replaced
| 11357:8cb2a64b15da | 11358:ebbf8dca33d2 |
|---|---|
| 260 local attr = { | 260 local attr = { |
| 261 ["xmlns:stream"] = "http://etherx.jabber.org/streams", | 261 ["xmlns:stream"] = "http://etherx.jabber.org/streams", |
| 262 ["xml:lang"] = "en", | 262 ["xml:lang"] = "en", |
| 263 xmlns = stream_callbacks.default_ns, | 263 xmlns = stream_callbacks.default_ns, |
| 264 version = session.version and (session.version > 0 and "1.0" or nil), | 264 version = session.version and (session.version > 0 and "1.0" or nil), |
| 265 id = session.streamid, | 265 id = session.streamid or "", |
| 266 from = from or session.host, to = to, | 266 from = from or session.host, to = to, |
| 267 }; | 267 }; |
| 268 if session.stream_attrs then | 268 if session.stream_attrs then |
| 269 session:stream_attrs(from, to, attr) | 269 session:stream_attrs(from, to, attr) |
| 270 end | 270 end |
