Software /
code /
prosody
Comparison
plugins/mod_s2s/mod_s2s.lua @ 6901:ccc452767ec6
mod_s2s: Fire global event for stream features where the remote server has not sent the 'to' stream attribute
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 11 Oct 2015 14:03:53 +0200 |
parent | 6848:32327c80710b |
child | 6905:0e81e3dab896 |
child | 7101:f83211f4d776 |
comparison
equal
deleted
inserted
replaced
6900:44a7e9152b9a | 6901:ccc452767ec6 |
---|---|
347 | 347 |
348 if to then | 348 if to then |
349 hosts[to].events.fire_event("s2s-stream-features", { origin = session, features = features }); | 349 hosts[to].events.fire_event("s2s-stream-features", { origin = session, features = features }); |
350 else | 350 else |
351 (session.log or log)("warn", "No 'to' on stream header from %s means we can't offer any features", from or session.ip or "unknown host"); | 351 (session.log or log)("warn", "No 'to' on stream header from %s means we can't offer any features", from or session.ip or "unknown host"); |
352 fire_global_event("s2s-stream-features-legacy", { origin = session, features = features }); | |
352 end | 353 end |
353 | 354 |
354 if ( session.type == "s2sin" or session.type == "s2sout" ) or features.tags[1] then | 355 if ( session.type == "s2sin" or session.type == "s2sout" ) or features.tags[1] then |
355 log("debug", "Sending stream features: %s", tostring(features)); | 356 log("debug", "Sending stream features: %s", tostring(features)); |
356 session.sends2s(features); | 357 session.sends2s(features); |