Mercurial > prosody-hg
comparison plugins/mod_bosh.lua @ 9380:7425af27fc67
mod_bosh: Fire stream feature event on hosts (thanks gerald)
Since the module is now global, this event was also fired in a global
context by default.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 24 Sep 2018 17:46:51 +0200 |
| parents | f2013233e20d |
| children | 2e07d2f71599 |
comparison
equal
deleted
inserted
replaced
| 9379:866cba3689f4 | 9380:7425af27fc67 |
|---|---|
| 417 context.sid = sid; | 417 context.sid = sid; |
| 418 session.bosh_processing = true; -- Used to suppress replies until processing of this request is done | 418 session.bosh_processing = true; -- Used to suppress replies until processing of this request is done |
| 419 | 419 |
| 420 if session.notopen then | 420 if session.notopen then |
| 421 local features = st.stanza("stream:features"); | 421 local features = st.stanza("stream:features"); |
| 422 module:fire_event("stream-features", { origin = session, features = features }); | 422 module:context(session.host):fire_event("stream-features", { origin = session, features = features }); |
| 423 session.send(features); | 423 session.send(features); |
| 424 session.notopen = nil; | 424 session.notopen = nil; |
| 425 end | 425 end |
| 426 end | 426 end |
| 427 | 427 |
