#1080 mod_discoitems: overrides for all domains if loaded globally
Reporter
Ge0rG
Owner
Nobody
Created
Updated
Stars
★ (1)
Tags
Component-Community
Priority-Medium
Type-Defect
Status-New
Ge0rG
on
The documentation claims:
> Simply add "discoitems" to your modules_enabled list. Then add the disco_items option to hosts for which you wish to override the default response.
However, if the module is loaded globally, it will also override the disco#items for domains that do not have a `disco_items` config option set, to the empty list.
Loading the "discoitems" module only on the host I want limited works around this problem.
I'm not sure if this was only introduced with a recent change to prosody 0.10 (I'm running the 1nightly459-1~stretch debian package), or if it was triggered by a config change I did.
Please change the module to not override the disco#items response if no `disco_items` variable is set for a host, or at least document the behavior.
Ge0rG
on
P.S: It is also a bit frustrating and inconsistent that the module is called "discoitems" but the config value is called "disco_items".
Zash
on
What if we simply add a conditional around the 3 line loop that adds "children" to disco#items ?
Having an entire separate module that duplicates everyhing, except that one loop, seems wasteful somehow.
The documentation claims: > Simply add "discoitems" to your modules_enabled list. Then add the disco_items option to hosts for which you wish to override the default response. However, if the module is loaded globally, it will also override the disco#items for domains that do not have a `disco_items` config option set, to the empty list. Loading the "discoitems" module only on the host I want limited works around this problem. I'm not sure if this was only introduced with a recent change to prosody 0.10 (I'm running the 1nightly459-1~stretch debian package), or if it was triggered by a config change I did. Please change the module to not override the disco#items response if no `disco_items` variable is set for a host, or at least document the behavior.
P.S: It is also a bit frustrating and inconsistent that the module is called "discoitems" but the config value is called "disco_items".
What if we simply add a conditional around the 3 line loop that adds "children" to disco#items ? Having an entire separate module that duplicates everyhing, except that one loop, seems wasteful somehow.