comparison mod_muc_notifications/mod_muc_notifications.lua @ 4089:ef752c5115f7

mod_muc_notifications: adapt to MUC get_name() API changes
author marc0s <marcos@tenak.net>
date Tue, 08 Sep 2020 12:35:51 +0200
parents 69219097aa85
children
comparison
equal deleted inserted replaced
4088:439ae12bb136 4089:ef752c5115f7
42 } 42 }
43 local not_attrs = { 43 local not_attrs = {
44 xmlns = "http://quobis.com/xmpp/muc#push", 44 xmlns = "http://quobis.com/xmpp/muc#push",
45 jid = room.jid, 45 jid = room.jid,
46 } 46 }
47 local reason = "You have messages in group chat "..room:get_name() 47 local reason = "You have messages in group chat "..(room:get_name() or room.jid)
48 local notification = st.message(attrs) 48 local notification = st.message(attrs)
49 :body(reason):up() 49 :body(reason):up()
50 :tag("notification", not_attrs):up() 50 :tag("notification", not_attrs):up()
51 :tag("no-store", {xmlns = "urn:xmpp:hints"}) 51 :tag("no-store", {xmlns = "urn:xmpp:hints"})
52 local invite = st.message(attrs):tag("x", {xmlns = "http://jabber.org/protocol/muc#user"}) 52 local invite = st.message(attrs):tag("x", {xmlns = "http://jabber.org/protocol/muc#user"})