Software /
code /
prosody-modules
Comparison
mod_push2/mod_push2.lua @ 6186: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 |
parent | 6185:c887820cd884 |
child | 6190:aa240145aa22 |
comparison
equal
deleted
inserted
replaced
6185:c887820cd884 | 6186:1cf563a94620 |
---|---|
507 -- This is a problem if you wan to to also hook offline message storage for example | 507 -- This is a problem if you wan to to also hook offline message storage for example |
508 local stanza = st.clone(event.stanza) | 508 local stanza = st.clone(event.stanza) |
509 stanza:tag("stanza-id", { xmlns = "urn:xmpp:sid:0", by = event.for_user.."@"..module.host, id = event.id }):up() | 509 stanza:tag("stanza-id", { xmlns = "urn:xmpp:sid:0", by = event.for_user.."@"..module.host, id = event.id }):up() |
510 local user_session = host_sessions[event.for_user] and host_sessions[event.for_user].sessions or {} | 510 local user_session = host_sessions[event.for_user] and host_sessions[event.for_user].sessions or {} |
511 local to = stanza.attr.to | 511 local to = stanza.attr.to |
512 local to_user, to_host = to and jid.split(to) | 512 local to_user, to_host = jid.split(to) |
513 to_user = to_user or event.origin.username | 513 to_user = to_user or event.origin.username |
514 to_host = to_host or module.host | 514 to_host = to_host or module.host |
515 | 515 |
516 -- only notify if the stanza destination is the mam user we store it for | 516 -- only notify if the stanza destination is the mam user we store it for |
517 if event.for_user == to_user and to_host == module.host then | 517 if event.for_user == to_user and to_host == module.host then |