Mercurial > prosody-modules
diff mod_push2/mod_push2.lua @ 6158:1cf563a94620
mod_push2: this expression was throwing away the second value
And wasn't a needed guard anyway, util.jid.split(nil) is nil
| author | Stephen Paul Weber <singpolyma@singpolyma.net> |
|---|---|
| date | Tue, 04 Feb 2025 10:30:33 -0500 |
| parents | c887820cd884 |
| children | aa240145aa22 |
line wrap: on
line diff
--- a/mod_push2/mod_push2.lua Mon Feb 03 17:04:23 2025 -0500 +++ b/mod_push2/mod_push2.lua Tue Feb 04 10:30:33 2025 -0500 @@ -509,7 +509,7 @@ stanza:tag("stanza-id", { xmlns = "urn:xmpp:sid:0", by = event.for_user.."@"..module.host, id = event.id }):up() local user_session = host_sessions[event.for_user] and host_sessions[event.for_user].sessions or {} local to = stanza.attr.to - local to_user, to_host = to and jid.split(to) + local to_user, to_host = jid.split(to) to_user = to_user or event.origin.username to_host = to_host or module.host
