Comparison

plugins/mod_muc_unique.lua @ 12977:74b9e05af71e

plugins: Prefix module imports with prosody namespace
author Kim Alvefur <zash@zash.se>
date Fri, 24 Mar 2023 13:15:28 +0100
parent 8878:7c3e16fdaf1d
comparison
equal deleted inserted replaced
12976:a187600ec7d6 12977:74b9e05af71e
1 -- XEP-0307: Unique Room Names for Multi-User Chat 1 -- XEP-0307: Unique Room Names for Multi-User Chat
2 local st = require "util.stanza"; 2 local st = require "prosody.util.stanza";
3 local unique_name = require "util.id".medium; 3 local unique_name = require "prosody.util.id".medium;
4 module:add_feature "http://jabber.org/protocol/muc#unique" 4 module:add_feature "http://jabber.org/protocol/muc#unique"
5 module:hook("iq-get/host/http://jabber.org/protocol/muc#unique:unique", function(event) 5 module:hook("iq-get/host/http://jabber.org/protocol/muc#unique:unique", function(event)
6 local origin, stanza = event.origin, event.stanza; 6 local origin, stanza = event.origin, event.stanza;
7 origin.send(st.reply(stanza) 7 origin.send(st.reply(stanza)
8 :tag("unique", {xmlns = "http://jabber.org/protocol/muc#unique"}) 8 :tag("unique", {xmlns = "http://jabber.org/protocol/muc#unique"})