Software / code / prosody
Comparison
plugins/mod_bosh.lua @ 13293:ad1ed84fdf13
mod_bosh: Include stream attributes in stream-features event
This matches what mod_c2s does, and fixes a traceback in mod_sasl2_fast when
used with BOSH (that module tries to use event.stream.from).
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sat, 28 Oct 2023 13:15:56 +0100 |
| parent | 13213:50324f66ca2a |
| child | 13460:a688947fab1e |
comparison
equal
deleted
inserted
replaced
| 13292:8fbdd878fcf6 | 13293:ad1ed84fdf13 |
|---|---|
| 454 context.sid = sid; | 454 context.sid = sid; |
| 455 session.bosh_processing = true; -- Used to suppress replies until processing of this request is done | 455 session.bosh_processing = true; -- Used to suppress replies until processing of this request is done |
| 456 | 456 |
| 457 if session.notopen then | 457 if session.notopen then |
| 458 local features = st.stanza("stream:features"); | 458 local features = st.stanza("stream:features"); |
| 459 module:context(session.host):fire_event("stream-features", { origin = session, features = features }); | 459 module:context(session.host):fire_event("stream-features", { origin = session, features = features, stream = attr }); |
| 460 session.send(features); | 460 session.send(features); |
| 461 session.notopen = nil; | 461 session.notopen = nil; |
| 462 end | 462 end |
| 463 end | 463 end |
| 464 | 464 |