equal
deleted
inserted
replaced
335 form_data["last-message-body"] = stanza:get_child_text("body"); |
335 form_data["last-message-body"] = stanza:get_child_text("body"); |
336 elseif stanza and dummy_body and is_important(stanza) then |
336 elseif stanza and dummy_body and is_important(stanza) then |
337 form_data["last-message-body"] = tostring(dummy_body); |
337 form_data["last-message-body"] = tostring(dummy_body); |
338 end |
338 end |
339 |
339 |
|
340 push_notification_payload:add_child(push_form:form(form_data)); |
|
341 |
340 local push_publish = st.iq({ to = push_info.jid, from = module.host, type = "set", id = stanza_id }) |
342 local push_publish = st.iq({ to = push_info.jid, from = module.host, type = "set", id = stanza_id }) |
341 :tag("pubsub", { xmlns = "http://jabber.org/protocol/pubsub" }) |
343 :tag("pubsub", { xmlns = "http://jabber.org/protocol/pubsub" }) |
342 :tag("publish", { node = push_info.node }) |
344 :tag("publish", { node = push_info.node }) |
343 :tag("item") |
345 :tag("item") |
344 :add_child(push_notification_payload) |
346 :add_child(push_notification_payload) |
345 :add_child(push_form:form(form_data)) |
|
346 :up() |
347 :up() |
347 :up(); |
348 :up(); |
348 |
349 |
349 if push_info.options then |
350 if push_info.options then |
350 push_publish:tag("publish-options"):add_child(st.deserialize(push_info.options)); |
351 push_publish:tag("publish-options"):add_child(st.deserialize(push_info.options)); |