<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://hg.omfa.de/prosody-hg/</link>
    <language>en-us</language>

    <title>prosody-hg: core/moduleapi.lua history</title>
    <description>core/moduleapi.lua revision history</description>
    <item>
    <title>Merge 13.0-&gt;trunk</title>
    <link>http://hg.omfa.de/prosody-hg/log/9728c3fabeef/core/moduleapi.lua</link>
    <description><![CDATA[Merge 13.0-&gt;trunk]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Wed, 29 Apr 2026 17:12:59 +0100</pubDate>
</item>
<item>
    <title>Merge 0.12-&gt;13.0</title>
    <link>http://hg.omfa.de/prosody-hg/log/e3ddbf7f2d3f/core/moduleapi.lua</link>
    <description><![CDATA[Merge 0.12-&gt;13.0]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Wed, 29 Apr 2026 17:12:11 +0100</pubDate>
</item>
<item>
    <title>moduleapi: Use multitable add/remove instead of set</title>
    <link>http://hg.omfa.de/prosody-hg/log/f881ed0ee8bd/core/moduleapi.lua</link>
    <description><![CDATA[moduleapi: Use multitable add/remove instead of set<br/>
<br/>
multitable:set() does not clear intermediate keys when setting the last one to<br/>
nil. This meant that the event_handlers multitable for every module was not<br/>
properly cleaning up the object and event name from the table when calling<br/>
:unhook_object_event().<br/>
<br/>
This combined badly with e.g. mod_bookmarks, which uses this extensively to<br/>
add/remove hooks dynamically for mod_pep services. The multitable kept a<br/>
reference to every mod_pep service object ever created, causing a memory leak.<br/>
<br/>
The multitable:remove() function clears intermediate keys when they are empty,<br/>
so we've switched to using that now.]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Fri, 17 Apr 2026 17:39:06 +0100</pubDate>
</item>
<item>
    <title>Merge 13.0-&gt;trunk</title>
    <link>http://hg.omfa.de/prosody-hg/log/5aacae4b2ccf/core/moduleapi.lua</link>
    <description><![CDATA[Merge 13.0-&gt;trunk]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Fri, 17 Apr 2026 17:47:01 +0100</pubDate>
</item>
<item>
    <title>moduleapi: Use multitable add/remove instead of set</title>
    <link>http://hg.omfa.de/prosody-hg/log/374b72785488/core/moduleapi.lua</link>
    <description><![CDATA[moduleapi: Use multitable add/remove instead of set<br/>
<br/>
multitable:set() does not clear intermediate keys when setting the last one to<br/>
nil. This meant that the event_handlers multitable for every module was not<br/>
properly cleaning up the object and event name from the table when calling<br/>
:unhook_object_event().<br/>
<br/>
This combined badly with e.g. mod_bookmarks, which uses this extensively to<br/>
add/remove hooks dynamically for mod_pep services. The multitable kept a<br/>
reference to every mod_pep service object ever created, causing a memory leak.<br/>
<br/>
The multitable:remove() function clears intermediate keys when they are empty,<br/>
so we've switched to using that now.]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Fri, 17 Apr 2026 17:39:06 +0100</pubDate>
</item>
<item>
    <title>Merge 13.0-&gt;trunk</title>
    <link>http://hg.omfa.de/prosody-hg/log/a124e80d3498/core/moduleapi.lua</link>
    <description><![CDATA[Merge 13.0-&gt;trunk]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Wed, 11 Mar 2026 16:59:10 +0100</pubDate>
</item>
<item>
    <title>core.moduleapi: Use default value when enum option has incorrect value</title>
    <link>http://hg.omfa.de/prosody-hg/log/3e6bb6ffbd43/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Use default value when enum option has incorrect value<br/>
<br/>
Is an error without consequences even an error?]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Wed, 11 Mar 2026 16:53:48 +0100</pubDate>
</item>
<item>
    <title>core.moduleapi: Fix :context() called from a global module</title>
    <link>http://hg.omfa.de/prosody-hg/log/cf21d285385b/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Fix :context() called from a global module<br/>
<br/>
Because `is_global` defaults to nil, it passes trough the metatabele to<br/>
the calling module, so a host context retrieved from a global module<br/>
would have the .global flag be true. This causes trouble with the code<br/>
retrieving the hostname in `module:http_url()`, so `http:list()` in the<br/>
shell would produce host URLs like `https://*:5281/`]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Wed, 05 Nov 2025 16:19:50 +0100</pubDate>
</item>
<item>
    <title>moduleapi: Fix traceback when no host passed to :context() (thanks Menel, riau)</title>
    <link>http://hg.omfa.de/prosody-hg/log/a0faff6ba853/core/moduleapi.lua</link>
    <description><![CDATA[moduleapi: Fix traceback when no host passed to :context() (thanks Menel, riau)<br/>
<br/>
I don't particularly like this, but it seems to be depended on and I don't<br/>
plan to break the API at this time.]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Thu, 03 Jul 2025 10:59:17 +0100</pubDate>
</item>
<item>
    <title>moduleapi: :hook(): don't silently fall back to global events when host unknown</title>
    <link>http://hg.omfa.de/prosody-hg/log/622790951285/core/moduleapi.lua</link>
    <description><![CDATA[moduleapi: :hook(): don't silently fall back to global events when host unknown<br/>
<br/>
This code will throw an error instead, but it's a situation that shouldn't<br/>
happen (especially now :context() rejects unknown hosts).<br/>
<br/>
Related to #605]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Fri, 27 Jun 2025 11:12:50 +0100</pubDate>
</item>
<item>
    <title>moduleapi: :context(): ensure requested host exists (fixes #605)</title>
    <link>http://hg.omfa.de/prosody-hg/log/e6c6f58dfda1/core/moduleapi.lua</link>
    <description><![CDATA[moduleapi: :context(): ensure requested host exists (fixes #605)]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Fri, 27 Jun 2025 11:11:08 +0100</pubDate>
</item>
<item>
    <title>moduleapi: Allow soft dependencies via module:depends(mod, true)</title>
    <link>http://hg.omfa.de/prosody-hg/log/4309c934e813/core/moduleapi.lua</link>
    <description><![CDATA[moduleapi: Allow soft dependencies via module:depends(mod, true)]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Sun, 16 Feb 2025 13:29:07 +0000</pubDate>
</item>
<item>
    <title>core.moduleapi: Include source modules when handling items</title>
    <link>http://hg.omfa.de/prosody-hg/log/a4217361c1c6/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Include source modules when handling items<br/>
<br/>
This improves consistency. Previously the 'source' field was only<br/>
provided in the original event when an item was added. It is used to<br/>
report the name of the module providing the item in a few places.<br/>
<br/>
Also considered adding a new API to modulemanager returning a mapping<br/>
of items per module and then using that here.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Wed, 08 Jan 2025 08:33:34 +0100</pubDate>
</item>
<item>
    <title>Merge 0.12-&gt;trunk</title>
    <link>http://hg.omfa.de/prosody-hg/log/a1bc6533bbba/core/moduleapi.lua</link>
    <description><![CDATA[Merge 0.12-&gt;trunk]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sun, 18 Aug 2024 17:01:47 +0200</pubDate>
</item>
<item>
    <title>core.moduleapi: Default labels to empty list to fix error if omitted</title>
    <link>http://hg.omfa.de/prosody-hg/log/2fb79fe54390/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Default labels to empty list to fix error if omitted<br/>
<br/>
In a host-scoped module in the `if is_scoped` clause the resulting<br/>
`array:append(nil)` call throws.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sun, 18 Aug 2024 16:58:30 +0200</pubDate>
</item>
<item>
    <title>moduleapi: Log error message when ambiguous period spec is found in config</title>
    <link>http://hg.omfa.de/prosody-hg/log/80a1ce9974e5/core/moduleapi.lua</link>
    <description><![CDATA[moduleapi: Log error message when ambiguous period spec is found in config]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Thu, 30 Nov 2023 13:43:23 +0000</pubDate>
</item>
<item>
    <title>moduleapi: Rename :once() to :on_ready() for clarity</title>
    <link>http://hg.omfa.de/prosody-hg/log/6037b7a2131c/core/moduleapi.lua</link>
    <description><![CDATA[moduleapi: Rename :once() to :on_ready() for clarity<br/>
<br/>
'Once' is ambiguous - once per what?<br/>
<br/>
on_ready() executes its parameter when the module is loaded *and* the server<br/>
has finished starting.]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Thu, 30 Nov 2023 10:07:53 +0000</pubDate>
</item>
<item>
    <title>moduleapi: may(): Support explicit actor_jid in context object</title>
    <link>http://hg.omfa.de/prosody-hg/log/113ce2ac73a2/core/moduleapi.lua</link>
    <description><![CDATA[moduleapi: may(): Support explicit actor_jid in context object]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Tue, 07 Nov 2023 11:53:57 +0000</pubDate>
</item>
<item>
    <title>core.moduleapi: Parse period min/max arguments</title>
    <link>http://hg.omfa.de/prosody-hg/log/59c3d775c7fa/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Parse period min/max arguments<br/>
<br/>
Allows specifying them the same way as the default and in the config,<br/>
for consistency]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sat, 22 Jul 2023 12:08:01 +0200</pubDate>
</item>
<item>
    <title>core.moduleapi: Fix min/maxinteger fallback for Lua 5.2</title>
    <link>http://hg.omfa.de/prosody-hg/log/b1c2e70de470/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Fix min/maxinteger fallback for Lua 5.2<br/>
<br/>
Maybe these should live in util.mathcompat?]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Mon, 17 Jul 2023 02:32:47 +0200</pubDate>
</item>
<item>
    <title>core.moduleapi: Add min/max range support to :get_option_period</title>
    <link>http://hg.omfa.de/prosody-hg/log/3e6e98cc63e9/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Add min/max range support to :get_option_period<br/>
<br/>
To match :get_option_number etc, specifying the allowed interval.<br/>
<br/>
Default is essentially (0, inf].]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Mon, 17 Jul 2023 00:37:44 +0200</pubDate>
</item>
<item>
    <title>moduleapi: Add :get_option_integer()</title>
    <link>http://hg.omfa.de/prosody-hg/log/4d4f9e42bcf8/core/moduleapi.lua</link>
    <description><![CDATA[moduleapi: Add :get_option_integer()<br/>
<br/>
Many options in Prosody that are treated as numbers don't make sense as<br/>
floats, e.g. sizes and limits measured in bytes.<br/>
<br/>
Simplified implementation based on an earlier attempt dating back to 2020]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Mon, 17 Jul 2023 00:09:41 +0200</pubDate>
</item>
<item>
    <title>core.moduleapi: Accept boolean false to disable period setting</title>
    <link>http://hg.omfa.de/prosody-hg/log/a7c6ea1c5308/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Accept boolean false to disable period setting]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sun, 16 Jul 2023 21:04:42 +0200</pubDate>
</item>
<item>
    <title>core.moduleapi: Log error for unexpected types (booleans?) set as periods</title>
    <link>http://hg.omfa.de/prosody-hg/log/c563da1694bf/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Log error for unexpected types (booleans?) set as periods]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sun, 16 Jul 2023 21:02:24 +0200</pubDate>
</item>
<item>
    <title>core.moduleapi: Turn negative periods or &quot;never&quot; into infinity</title>
    <link>http://hg.omfa.de/prosody-hg/log/7435a9341bb3/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Turn negative periods or &quot;never&quot; into infinity<br/>
<br/>
As a way to signal that the periodic thing should be disabled, matching<br/>
existing mod_mam usage]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sun, 16 Jul 2023 21:01:31 +0200</pubDate>
</item>
<item>
    <title>core.moduleapi: Improve handling of different types in :get_option_period</title>
    <link>http://hg.omfa.de/prosody-hg/log/0ccd82b965d5/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Improve handling of different types in :get_option_period<br/>
<br/>
Pass positive numbers trough unharmed, parse strings as periods, discard<br/>
anything else.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sun, 16 Jul 2023 20:59:27 +0200</pubDate>
</item>
<item>
    <title>core.moduleapi: Add :get_option_period for parsing time intervals</title>
    <link>http://hg.omfa.de/prosody-hg/log/c9ef35fab0b1/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Add :get_option_period for parsing time intervals<br/>
<br/>
E.g. for use in mod_mam and others that take an amount of time before<br/>
some (usually cleanup) action is taken.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sun, 16 Jul 2023 19:49:12 +0200</pubDate>
</item>
<item>
    <title>core.moduleapi: Allow specifying an acceptable range for number options</title>
    <link>http://hg.omfa.de/prosody-hg/log/aa6c2692a4be/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Allow specifying an acceptable range for number options]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Tue, 05 Oct 2021 15:36:38 +0200</pubDate>
</item>
<item>
    <title>moduleapi: Add enum config option method</title>
    <link>http://hg.omfa.de/prosody-hg/log/65fb0d7a2312/core/moduleapi.lua</link>
    <description><![CDATA[moduleapi: Add enum config option method<br/>
<br/>
For when a setting has a few fixed values it can take]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sat, 16 Jan 2021 20:40:14 +0100</pubDate>
</item>
<item>
    <title>moduleapi: Add luacheck annotation to suppress warning about unused self</title>
    <link>http://hg.omfa.de/prosody-hg/log/8aec903ea888/core/moduleapi.lua</link>
    <description><![CDATA[moduleapi: Add luacheck annotation to suppress warning about unused self<br/>
<br/>
This is a convenience function, and there is currently no module-specific code<br/>
required to implement it. Not using 'self' is to be expected.]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Sat, 01 Apr 2023 12:30:29 +0100</pubDate>
</item>
<item>
    <title>moduleapi: Add module:once() to execute a function after module load/startup</title>
    <link>http://hg.omfa.de/prosody-hg/log/46c05c2e34f7/core/moduleapi.lua</link>
    <description><![CDATA[moduleapi: Add module:once() to execute a function after module load/startup<br/>
<br/>
It is a common pattern for modules to do something like check for<br/>
prosody.start_time, and execute code immediately if it is present, or wait for<br/>
the server-started event if it isn't yet. For example, this allows you to run<br/>
code after all other modules/hosts have been loaded, that are going to be<br/>
loaded.<br/>
<br/>
Such code can now be replaced with a simple call to this method.]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Sat, 01 Apr 2023 11:59:50 +0100</pubDate>
</item>
<item>
    <title>moduleapi: Add 'peek' to :may() and new :could() helper to suppress logging</title>
    <link>http://hg.omfa.de/prosody-hg/log/e385f3a06673/core/moduleapi.lua</link>
    <description><![CDATA[moduleapi: Add 'peek' to :may() and new :could() helper to suppress logging<br/>
<br/>
The current method logs scary &quot;access denied&quot; messages on failure - this is<br/>
generally very useful when debugging access control stuff, but in some cases<br/>
the call is simply a check to see if someone *could* perform an action, even<br/>
if they haven't requested it yet. One example is determining whether to show<br/>
the user as an admin in disco.<br/>
<br/>
The 'peek' parameter, if true, will suppress such logging.<br/>
<br/>
The :could() method is just a simple helper that can make the calling code a<br/>
bit more readable (suggested by Zash).]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Sun, 26 Mar 2023 14:06:04 +0100</pubDate>
</item>
<item>
    <title>moduleapi: may: Fail early if a local session has no role assigned</title>
    <link>http://hg.omfa.de/prosody-hg/log/5625da6ae6b6/core/moduleapi.lua</link>
    <description><![CDATA[moduleapi: may: Fail early if a local session has no role assigned<br/>
<br/>
We expect every session to explicitly have a role assigned. Falling back to<br/>
any kind of &quot;default&quot; role (even the user's default role) in the absence of<br/>
an explicit role could open up the possibility of accidental privilege<br/>
escalation.]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Sat, 25 Mar 2023 19:38:41 +0000</pubDate>
</item>
<item>
    <title>core: Prefix module imports with prosody namespace</title>
    <link>http://hg.omfa.de/prosody-hg/log/ead41e25ebc0/core/moduleapi.lua</link>
    <description><![CDATA[core: Prefix module imports with prosody namespace]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Fri, 17 Mar 2023 16:23:07 +0100</pubDate>
</item>
<item>
    <title>core.moduleapi: Record reverse dependencies</title>
    <link>http://hg.omfa.de/prosody-hg/log/d238633a9d67/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Record reverse dependencies<br/>
<br/>
Useful to know why a module was auto-loaded without having to dig trough<br/>
all other modules for the one that depends on it.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sun, 05 Mar 2023 14:07:08 +0100</pubDate>
</item>
<item>
    <title>core.moduleapi: Fix passing variable to logging</title>
    <link>http://hg.omfa.de/prosody-hg/log/b9468c8ac1d3/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Fix passing variable to logging]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Tue, 31 Jan 2023 07:48:21 +0100</pubDate>
</item>
<item>
    <title>core.moduleapi: Check for local role-aware sessions before e.g. s2s</title>
    <link>http://hg.omfa.de/prosody-hg/log/546c7e0f3f31/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Check for local role-aware sessions before e.g. s2s<br/>
<br/>
The condition checked for s2sin but not s2sout, so would have ignored<br/>
bidi-enabled s2sout sessions.  Components as well.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Mon, 29 Aug 2022 11:47:31 +0200</pubDate>
</item>
<item>
    <title>mod_authz_internal, and more: New iteration of role API</title>
    <link>http://hg.omfa.de/prosody-hg/log/07424992d7fc/core/moduleapi.lua</link>
    <description><![CDATA[mod_authz_internal, and more: New iteration of role API<br/>
<br/>
These changes to the API (hopefully the last) introduce a cleaner separation<br/>
between the user's primary (default) role, and their secondary (optional)<br/>
roles.<br/>
<br/>
To keep the code sane and reduce complexity, a data migration is needed for<br/>
people using stored roles in 0.12. This can be performed with<br/>
<br/>
  prosodyctl mod_authz_internal migrate &lt;host&gt;]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Wed, 17 Aug 2022 16:38:53 +0100</pubDate>
</item>
<item>
    <title>moduleapi: Stricter type check for actor in permission check</title>
    <link>http://hg.omfa.de/prosody-hg/log/30e2a0107217/core/moduleapi.lua</link>
    <description><![CDATA[moduleapi: Stricter type check for actor in permission check<br/>
<br/>
Non-table but truthy values would trigger &quot;attempt to index a foo value&quot;<br/>
on the next line otherwise]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Wed, 20 Jul 2022 13:08:07 +0200</pubDate>
</item>
<item>
    <title>moduleapi: Remove redundant expansion of ':' prefix in permission names</title>
    <link>http://hg.omfa.de/prosody-hg/log/1ce98f27eabe/core/moduleapi.lua</link>
    <description><![CDATA[moduleapi: Remove redundant expansion of ':' prefix in permission names]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Wed, 20 Jul 2022 13:07:04 +0200</pubDate>
</item>
<item>
    <title>moduleapi: Distribute permissions set from global modules to all hosts</title>
    <link>http://hg.omfa.de/prosody-hg/log/e08bf2ad67da/core/moduleapi.lua</link>
    <description><![CDATA[moduleapi: Distribute permissions set from global modules to all hosts<br/>
<br/>
Roles and permissions will always happen in the context of a host.<br/>
<br/>
Prevents error upon indexing since `hosts[&quot;*&quot;] == nil`]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Wed, 20 Jul 2022 13:05:35 +0200</pubDate>
</item>
<item>
    <title>core.moduleapi: Expand permission name ':' prefix earlier</title>
    <link>http://hg.omfa.de/prosody-hg/log/a741183eec97/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Expand permission name ':' prefix earlier<br/>
<br/>
Ensures it applies to the context as string case<br/>
<br/>
Somehow this fixes everything]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Wed, 15 Jun 2022 23:04:17 +0200</pubDate>
</item>
<item>
    <title>core.moduleapi: Fixup method name</title>
    <link>http://hg.omfa.de/prosody-hg/log/4262ce516e6c/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Fixup method name<br/>
<br/>
`get_user_role()` did not exist anywhere else.<br/>
<br/>
MattJ said `get_user_default_role()` was indented]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Wed, 15 Jun 2022 23:03:15 +0200</pubDate>
</item>
<item>
    <title>Switch to a new role-based authorization framework, removing is_admin()</title>
    <link>http://hg.omfa.de/prosody-hg/log/9061f9621330/core/moduleapi.lua</link>
    <description><![CDATA[Switch to a new role-based authorization framework, removing is_admin()<br/>
<br/>
We began moving away from simple &quot;is this user an admin?&quot; permission checks<br/>
before 0.12, with the introduction of mod_authz_internal and the ability to<br/>
dynamically change the roles of individual users.<br/>
<br/>
The approach in 0.12 still had various limitations however, and apart from<br/>
the introduction of roles other than &quot;admin&quot; and the ability to pull that info<br/>
from storage, not much actually changed.<br/>
<br/>
This new framework shakes things up a lot, though aims to maintain the same<br/>
functionality and behaviour on the surface for a default Prosody<br/>
configuration. That is, if you don't take advantage of any of the new<br/>
features, you shouldn't notice any change.<br/>
<br/>
The biggest change visible to developers is that usermanager.is_admin() (and<br/>
the auth provider is_admin() method) have been removed. Gone. Completely.<br/>
<br/>
Permission checks should now be performed using a new module API method:<br/>
<br/>
  module:may(action_name, context)<br/>
<br/>
This method accepts an action name, followed by either a JID (string) or<br/>
(preferably) a table containing 'origin'/'session' and 'stanza' fields (e.g.<br/>
the standard object passed to most events). It will return true if the action<br/>
should be permitted, or false/nil otherwise.<br/>
<br/>
Modules should no longer perform permission checks based on the role name.<br/>
E.g. a lot of code previously checked if the user's role was prosody:admin<br/>
before permitting some action. Since many roles might now exist with similar<br/>
permissions, and the permissions of prosody:admin may be redefined<br/>
dynamically, it is no longer suitable to use this method for permission<br/>
checks. Use module:may().<br/>
<br/>
If you start an action name with ':' (recommended) then the current module's<br/>
name will automatically be used as a prefix.<br/>
<br/>
To define a new permission, use the new module API:<br/>
<br/>
  module:default_permission(role_name, action_name)<br/>
  module:default_permissions(role_name, { action_name[, action_name...] })<br/>
<br/>
This grants the specified role permission to execute the named action(s) by<br/>
default. This may be overridden via other mechanisms external to your module.<br/>
<br/>
The built-in roles that developers should use are:<br/>
<br/>
 - prosody:user (normal user)<br/>
 - prosody:admin (host admin)<br/>
 - prosody:operator (global admin)<br/>
<br/>
The new prosody:operator role is intended for server-wide actions (such as<br/>
shutting down Prosody).<br/>
<br/>
Finally, all usage of is_admin() in modules has been fixed by this commit.<br/>
Some of these changes were trickier than others, but no change is expected to<br/>
break existing deployments.<br/>
<br/>
EXCEPT: mod_auth_ldap no longer supports the ldap_admin_filter option. It's<br/>
very possible nobody is using this, but if someone is then we can later update<br/>
it to pull roles from LDAP somehow.]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Wed, 15 Jun 2022 12:15:01 +0100</pubDate>
</item>
<item>
    <title>compat: Use table.pack (there since Lua 5.2) over our util.table</title>
    <link>http://hg.omfa.de/prosody-hg/log/5eaf77114fdb/core/moduleapi.lua</link>
    <description><![CDATA[compat: Use table.pack (there since Lua 5.2) over our util.table<br/>
<br/>
Added in d278a770eddc avoid having to deal with its absence in Lua 5.1.<br/>
No longer needed when Lua 5.1 support is dropped.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Mon, 11 Jul 2022 19:15:24 +0200</pubDate>
</item>
<item>
    <title>compat: Remove handling of Lua 5.1 location of 'unpack' function</title>
    <link>http://hg.omfa.de/prosody-hg/log/39ae08180c81/core/moduleapi.lua</link>
    <description><![CDATA[compat: Remove handling of Lua 5.1 location of 'unpack' function]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Mon, 11 Jul 2022 19:07:38 +0200</pubDate>
</item>
<item>
    <title>core.moduleapi: Fix 'global' property via :context() - #1748</title>
    <link>http://hg.omfa.de/prosody-hg/log/4d36fbcdd210/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Fix 'global' property via :context() - #1748<br/>
<br/>
The 'global' property should reflect whether the module API instance<br/>
represents the global context or a VirtualHost or Component context.<br/>
However the module:context() method did not override this, leading the<br/>
property of the previous module shining trough, leading to bugs in code<br/>
relying on the 'global' property.<br/>
<br/>
See also #1736]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Wed, 27 Apr 2022 17:18:46 +0200</pubDate>
</item>
<item>
    <title>modulemanager, moduleapi: Switch to new pluginloader interface</title>
    <link>http://hg.omfa.de/prosody-hg/log/57d35fcde488/core/moduleapi.lua</link>
    <description><![CDATA[modulemanager, moduleapi: Switch to new pluginloader interface]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Fri, 04 Feb 2022 14:11:46 +0000</pubDate>
</item>
<item>
    <title>moduleapi: Support stripping of multi-word from module names</title>
    <link>http://hg.omfa.de/prosody-hg/log/c1d2bc6603ae/core/moduleapi.lua</link>
    <description><![CDATA[moduleapi: Support stripping of multi-word from module names<br/>
<br/>
The goal is to allow module:provides(&quot;foo-bar&quot;) with a mod_foo_bar_ prefix<br/>
being stripped. It will break any existing modules that use a prefix and have<br/>
hyphens instead of underscores. No such modules are known.]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Wed, 22 Dec 2021 14:40:42 +0000</pubDate>
</item>
<item>
    <title>mod_cron: Add a 'weekly' job frequency</title>
    <link>http://hg.omfa.de/prosody-hg/log/cbed7d8d8f35/core/moduleapi.lua</link>
    <description><![CDATA[mod_cron: Add a 'weekly' job frequency]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Fri, 03 Dec 2021 09:05:41 +0100</pubDate>
</item>
<item>
    <title>core.moduleapi: Add API for adding daily or hourly tasks via mod_cron</title>
    <link>http://hg.omfa.de/prosody-hg/log/4b519c575ad0/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Add API for adding daily or hourly tasks via mod_cron]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Sun, 21 Nov 2021 18:13:21 +0100</pubDate>
</item>
<item>
    <title>mod_admin_shell: List collected metrics in module:info</title>
    <link>http://hg.omfa.de/prosody-hg/log/c65d5da8e99a/core/moduleapi.lua</link>
    <description><![CDATA[mod_admin_shell: List collected metrics in module:info<br/>
<br/>
Lets you know what to look for with stats:show()]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Wed, 24 Nov 2021 20:03:38 +0100</pubDate>
</item>
<item>
    <title>core.moduleapi: Fix name of renamed API in log message</title>
    <link>http://hg.omfa.de/prosody-hg/log/89aef37fca54/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Fix name of renamed API in log message<br/>
<br/>
hook_stanza was renamed hook_tag in 2012 in 2087d42f1e77<br/>
Why do we still have hook_stanza?<br/>
<br/>
Why is this only a warning anyway?]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Thu, 18 Nov 2021 16:26:54 +0100</pubDate>
</item>
<item>
    <title>core.moduleapi: Ensure module:send_iq() handler priority over mod_iq</title>
    <link>http://hg.omfa.de/prosody-hg/log/36a7a3137d41/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Ensure module:send_iq() handler priority over mod_iq<br/>
<br/>
To prevent a situation where you for whatever reason use a full JID that<br/>
is currently online and the response ends up routed there instead of the<br/>
module:send_iq() handlers.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Fri, 24 Sep 2021 20:26:21 +0200</pubDate>
</item>
<item>
    <title>core.moduleapi: Enable full JID origin queries with module:send_iq()</title>
    <link>http://hg.omfa.de/prosody-hg/log/bdabb0425d77/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Enable full JID origin queries with module:send_iq()<br/>
<br/>
Since we don't currently have hooks that includes type and id here, we<br/>
need to check those attributes in the handlers.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Fri, 24 Sep 2021 20:17:31 +0200</pubDate>
</item>
<item>
    <title>core.moduleapi: Filter out unrelated direct replies to module:send_iq</title>
    <link>http://hg.omfa.de/prosody-hg/log/a9ad287c3388/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Filter out unrelated direct replies to module:send_iq<br/>
<br/>
This is primarily something that happens with an internal query to<br/>
mod_mam, which calls origin.send() several times with results, leading<br/>
to the first such result being treated as the final response and<br/>
resolving the promise.<br/>
<br/>
Now, these responses pass trough to the underlying origin.send(), where<br/>
they can be caught. Tricky but not impossible. For remote queries, it's<br/>
even trickier, you would likely need to bind a resource or similar.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Fri, 24 Sep 2021 20:12:16 +0200</pubDate>
</item>
<item>
    <title>Statistics: Rewrite statistics backends to use OpenMetrics</title>
    <link>http://hg.omfa.de/prosody-hg/log/5f15ab7c6ae5/core/moduleapi.lua</link>
    <description><![CDATA[Statistics: Rewrite statistics backends to use OpenMetrics<br/>
<br/>
The metric subsystem of Prosody has had some shortcomings from<br/>
the perspective of the current state-of-the-art in metric<br/>
observability.<br/>
<br/>
The OpenMetrics standard [0] is a formalization of the data<br/>
model (and serialization format) of the well-known and<br/>
widely-used Prometheus [1] software stack.<br/>
<br/>
The previous stats subsystem of Prosody did not map well to that<br/>
format (see e.g. [2] and [3]); the key reason is that it was<br/>
trying to do too much math on its own ([2]) while lacking<br/>
first-class support for &quot;families&quot; of metrics ([3]) and<br/>
structured metric metadata (despite the `extra` argument to<br/>
metrics, there was no standard way of representing common things<br/>
like &quot;tags&quot; or &quot;labels&quot;).<br/>
<br/>
Even though OpenMetrics has grown from the Prometheus world of<br/>
monitoring, it maps well to other popular monitoring stacks<br/>
such as:<br/>
<br/>
- InfluxDB (labels can be mapped to tags and fields as necessary)<br/>
- Carbon/Graphite (labels can be attached to the metric name with<br/>
  dot-separation)<br/>
- StatsD (see graphite when assuming that graphite is used as<br/>
  backend, which is the default)<br/>
<br/>
The util.statsd module has been ported to use the OpenMetrics<br/>
model as a proof of concept. An implementation which exposes<br/>
the util.statistics backend data as Prometheus metrics is<br/>
ready for publishing in prosody-modules (most likely as<br/>
mod_openmetrics_prometheus to avoid breaking existing 0.11<br/>
deployments).<br/>
<br/>
At the same time, the previous measure()-based API had one major<br/>
advantage: It is really simple and easy to use without requiring<br/>
lots of knowledge about OpenMetrics or similar concepts. For that<br/>
reason as well as compatibility with existing code, it is preserved<br/>
and may even be extended in the future.<br/>
<br/>
However, code relying on the `stats-updated` event as well as<br/>
`get_stats` from `statsmanager` will break because the data<br/>
model has changed completely; in case of `stats-updated`, the<br/>
code will simply not run (as the event was renamed in order<br/>
to avoid conflicts); the `get_stats` function has been removed<br/>
completely (so it will cause a traceback when it is attempted<br/>
to be used).<br/>
<br/>
Note that the measure_*_event methods have been removed from<br/>
the module API. I was unable to find any uses or documentation<br/>
and thus deemed they should not be ported. Re-implementation is<br/>
possible when necessary.<br/>
<br/>
   [0]: https://openmetrics.io/<br/>
   [1]: https://prometheus.io/<br/>
   [2]: #959<br/>
   [3]: #960]]></description>
    <author>&#74;&#111;&#110;&#97;&#115;&#32;&#83;&#99;&#104;&#228;&#102;&#101;&#114;&#32;&#60;&#106;&#111;&#110;&#97;&#115;&#64;&#119;&#105;&#101;&#108;&#105;&#99;&#107;&#105;&#46;&#110;&#97;&#109;&#101;&#62;</author>
    <pubDate>Sun, 18 Apr 2021 11:47:41 +0200</pubDate>
</item>
<item>
    <title>core.moduleapi: Return resource path from module:get_directory() (API BC)</title>
    <link>http://hg.omfa.de/prosody-hg/log/1dc49accb58e/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Return resource path from module:get_directory() (API BC)<br/>
<br/>
:get_directory has so far returned the base directory of the current<br/>
module source code. This has worked well so far to load resources which<br/>
tend to be included in the same directory, but with the plugin installer<br/>
using LuaRocks, extra resources (e.g. templates and other assets) these<br/>
are saved in a completely different directory.<br/>
<br/>
In be73df6765b9 core.modulemanager gained some code for finding that<br/>
directory and saving it in module.resource_path but now the question is<br/>
how this should be reflected in the API.<br/>
<br/>
A survey of community modules suggest the vast majority use the<br/>
:get_directory method for locating templates and other assets, rather<br/>
than the code (which would use module:require instead).<br/>
<br/>
Therefore this commit changes :get_directory to return the resource_path<br/>
when available. This should work for most modules.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Fri, 09 Oct 2020 16:37:15 +0200</pubDate>
</item>
<item>
    <title>core.moduleapi: Use resource path for :load_resource()</title>
    <link>http://hg.omfa.de/prosody-hg/log/87d6f5924ae9/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Use resource path for :load_resource()]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Wed, 07 Oct 2020 16:10:51 +0200</pubDate>
</item>
<item>
    <title>core.moduleapi: Allow passing a config table trough :measure</title>
    <link>http://hg.omfa.de/prosody-hg/log/2f751880767c/core/moduleapi.lua</link>
    <description><![CDATA[core.moduleapi: Allow passing a config table trough :measure]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Fri, 04 Jan 2019 07:00:45 +0100</pubDate>
</item>

  </channel>
</rss>
