equal
deleted
inserted
replaced
20 module:log("debug", "Notifying of new registration"); |
20 module:log("debug", "Notifying of new registration"); |
21 local message = st.message{ type = "chat", from = registration_from } |
21 local message = st.message{ type = "chat", from = registration_from } |
22 :tag("body") |
22 :tag("body") |
23 :text(registration_notification:gsub("%$(%w+)", function (v) |
23 :text(registration_notification:gsub("%$(%w+)", function (v) |
24 return user[v] or user.session and user.session[v] or nil; |
24 return user[v] or user.session and user.session[v] or nil; |
25 end)); |
25 end)) |
|
26 :up(); |
26 for jid in registration_watchers do |
27 for jid in registration_watchers do |
27 module:log("debug", "Notifying %s", jid); |
28 module:log("debug", "Notifying %s", jid); |
28 message.attr.to = jid; |
29 message.attr.to = jid; |
29 module:send(message); |
30 module:send(message); |
30 end |
31 end |