> Firstly, note that mod_roster_command operates on .dat files on disk.
> Deleting .dat files also affects the files on disk. If a user is
> logged in however, their roster is loaded in memory, and editing the
> files on disk doesn't affect it until the user is completely logged
> out and logs back in again. If the user updates their roster before
> this, the in-memory version overwrites the version on disk.
This is fine - I plan to have it run in a nightly cron job, so if
anyone does this it will just leave their roster out of date for a day
or so.
> This may
> be why your deleting and re-subscribing isn't working. We are working
> on improving this situation in future Prosody versions.
I don't think this is the problem. I have gone offline with an
account, deleted the .dat, then tried to run mod_roster_command and
the .dat file for that (currently offline) user is not recreated. When
I go online again the roster is empty.
> Another reason could be that you are not using files, and have
> switched to SQL or other type of storage.
As above, deleting the .dat file makes the roster go empty so we're
definitely using files.
> Is your goal to have all users in the roster of all other users?
> mod_groups may be a better solution than using mod_roster_command. If
> you prefer mod_roster_command for some reason, stop Prosody, delete
> roster .dat files, use mod_roster_command to repopulate rosters,
> start Prosody again.
I can't recall the exact reason now but we were unable to use
mod_groups which is why Matthew was kind enough to create
mod_roster_command for us instead.
However further investigation has revealed something odd. It turns out
that no roster has been updated since last September - so
mod_roster_command is actually not modifying existing rosters either!
Any idea what would cause mod_roster_command to stop working? There
are no errors and the server logs don't show any problems. The
permissions on the roster folder are the same as on the accounts
folder, and "prosodyctl register" is able to create new account .dat
files, so there should be nothing preventing the prosody daemon from
creating the roster .dat files.
I'm not sure why this would have broken!
Thanks,
Adam.