Mercurial > prosody-hg
view plugins/mod_muc_unique.lua @ 9367:577c3a7f5045
mod_scansion_record: Remove unused JID mapping table [luacheck]
I have no idea what Matthew meant to use this for. Easy enough to put back.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 22 Sep 2018 17:24:28 +0200 |
| parents | 7c3e16fdaf1d |
| children | 74b9e05af71e |
line wrap: on
line source
-- XEP-0307: Unique Room Names for Multi-User Chat local st = require "util.stanza"; local unique_name = require "util.id".medium; module:add_feature "http://jabber.org/protocol/muc#unique" module:hook("iq-get/host/http://jabber.org/protocol/muc#unique:unique", function(event) local origin, stanza = event.origin, event.stanza; origin.send(st.reply(stanza) :tag("unique", {xmlns = "http://jabber.org/protocol/muc#unique"}) :text(unique_name():lower()) ); return true; end,-1);
