Hi,
On Sat, Feb 27, 2021 at 05:59:26AM -0800,
genilt...@gmail.com wrote:
> I have an administration panel that changes the prosody's DB (Mysql).
> When I add more users (affiliations) to the muc, the prosody does not
> update. And when I select inside one module, it does not bring the
> updated data that is in the DB.
>
> Prosody have any query/object cache? How to disable? Any idea to make
> the prosody update the affiliations that there are in the db?
While rooms are active, the authoritative copy of it lives in memory
only. Attempting to change any data of anything active via the data
storage layer will not work, it will get overwritten by Prosody at some
point.
Same with most user data, e.g. deleting the account of an online user
will have no effect and the user can simply change their password to
restore their account. Contact lists and other data are also cached in
memory.
Databases generally don't have any way to tell Prosody that the data
changed, so Prosody has no way to react to changes in data that it's not
told about.
The safe way to interact with Prosody to ensure correct behavior is to
do it via online APIs or while Prosody is shut down. For MUC
affiliations an ad-hoc command has been added in trunk[^1] to allow
changing them from outside the room. Something similar could be done with
a HTTP API if that works better for you. That ad-hoc command could be
called via [mod_rest](
https://modules.prosody.im/mod_rest) even.
[^1]: <
https://hg.prosody.im/trunk/rev/e4034f6668a5>
--
hope this helps,
Kim "Zash" Alvefur