Software / code / prosody
Comparison
plugins/muc/register.lib.lua @ 10341:4e406944ff85 0.11
MUC: Don't advertise registration feature on host JID (fixes #1451)
There is currently no mention in XEP-0045 of how or where to advertise
support for registration.
Advertising on the host JID may be confusable with service-wide
registration, as implemented in ejabberd.
A common and sensible pattern in XMPP is that a feature is advertised on
the JID where the service is available.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 20 Oct 2019 01:20:11 +0200 |
| parent | 9298:2d71040a959f |
| child | 10343:7651b80aaec3 |
comparison
equal
deleted
inserted
replaced
| 10298:906ea5e1ec75 | 10341:4e406944ff85 |
|---|---|
| 45 | 45 |
| 46 module:hook("muc-set-affiliation", function (event) | 46 module:hook("muc-set-affiliation", function (event) |
| 47 -- Clear reserved nick cache | 47 -- Clear reserved nick cache |
| 48 event.room._reserved_nicks = nil; | 48 event.room._reserved_nicks = nil; |
| 49 end); | 49 end); |
| 50 | |
| 51 module:add_feature("jabber:iq:register"); | |
| 52 | 50 |
| 53 module:hook("muc-disco#info", function (event) | 51 module:hook("muc-disco#info", function (event) |
| 54 event.reply:tag("feature", { var = "jabber:iq:register" }):up(); | 52 event.reply:tag("feature", { var = "jabber:iq:register" }):up(); |
| 55 end); | 53 end); |
| 56 | 54 |