Mercurial > prosody-modules
comparison mod_invites_register/mod_invites_register.lua @ 4599:06c9c9ef0a51
mod_invites_register: Fix missing 'from' attribute (thanks Martin)
This should probably cause a noisier error in Prosody, than the current
> No hosts[from_host] (please report): <stanza>
A stack trace would have been useful, for example.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 25 Jun 2021 15:12:46 +0200 |
parents | 52e1ab99d25e |
children | eee7ef8eb0a2 |
comparison
equal
deleted
inserted
replaced
4598:09f0911c735d | 4599:06c9c9ef0a51 |
---|---|
55 if not rostermanager.is_user_subscribed(username, host, contact) | 55 if not rostermanager.is_user_subscribed(username, host, contact) |
56 and not rostermanager.is_contact_pending_out(username, host, contact) then | 56 and not rostermanager.is_contact_pending_out(username, host, contact) then |
57 module:log("debug", "Sending automatic subscription request to %s from %s", contact, username); | 57 module:log("debug", "Sending automatic subscription request to %s from %s", contact, username); |
58 if rostermanager.set_contact_pending_out(username, host, contact) then | 58 if rostermanager.set_contact_pending_out(username, host, contact) then |
59 rostermanager.roster_push(username, host, contact); | 59 rostermanager.roster_push(username, host, contact); |
60 module:send(st.presence({type = "subscribe", to = contact })); | 60 module:send(st.presence({type = "subscribe", from = username.."@"..host, to = contact })); |
61 else | 61 else |
62 module:log("warn", "Failed to set contact pending out for %s", username); | 62 module:log("warn", "Failed to set contact pending out for %s", username); |
63 end | 63 end |
64 end | 64 end |
65 end | 65 end |