I'm in the process of setting up Prosody to try out instead of jabberd2.
So far everything is working well (and much more straightforward than
with jabberd2) but I'm a bit stuck trying to get mod_groups working -
none of the shared contacts appear on the roster.
My config file says:
modules_enabled = {
"groups"; -- Enable shared groups
}
groups_file = "/var/lib/prosody/shared_groups.ini"
That file exists and is in .ini format:
[Some Group]
jid@domain=Some Name
This seems to work according to the Prosody log file:
Oct 05 18:07:25 mydomain:groups info Groups loaded successfully
However in my contact list I can only see the self contact. I expected
to see all the shared users as offline.
Is there any particular trick to getting this going?
Many thanks,
Adam.
On 5 October 2011 09:21, Adam Nielsen <adam.n...@uq.edu.au> wrote:
> Hi all,
>
> I'm in the process of setting up Prosody to try out instead of jabberd2. So
> far everything is working well (and much more straightforward than with
> jabberd2) but I'm a bit stuck trying to get mod_groups working - none of the
> shared contacts appear on the roster.
>
Possibly one place I can think it might be going wrong... mod_groups
is not the same as jabberd2's roster population. You must be listed in
a group to see everyone else in a group.
We're working on supporting alternative functionality, e.g. making a
group of JIDs visible to everyone on the server. Unfortunately it's
tricky and we haven't finished yet. You can track progress at
http://prosody.im/bugs/167
If you're looking for something more similar to jabberd2's roster
population, you might be after mod_support_contact:
http://code.google.com/p/prosody-modules/wiki/mod_support_contact
(perhaps with support for multiple JIDs?).
Hope this helps... and if I'm barking up completely the wrong tree
about your problem, let me know :)
Regards,
Matthew
Thanks for the quick reply!
> Possibly one place I can think it might be going wrong... mod_groups
> is not the same as jabberd2's roster population. You must be listed in
> a group to see everyone else in a group.
Ahh I think that's the problem then. I'm using this in a small
department of ~50 people, split up into five or so groups. Each user
will belong to only one group, but they should be able to see everyone
in all the groups. Since I'm the only one in the "IT" group, that would
explain why my roster is empty.
> We're working on supporting alternative functionality, e.g. making a
> group of JIDs visible to everyone on the server. Unfortunately it's
> tricky and we haven't finished yet. You can track progress at
> http://prosody.im/bugs/167
Looks like that's what I'm after. Hopefully it will allow multiple
groups too...
> If you're looking for something more similar to jabberd2's roster
> population, you might be after mod_support_contact:
> http://code.google.com/p/prosody-modules/wiki/mod_support_contact
> (perhaps with support for multiple JIDs?).
Hmm, this could work, if I can have multiple JIDs in multiple groups.
Unfortunately I'm not using in-band registration though, as I have a
nightly script that runs 'prosodyctl register' to populate the accounts
automatically. So it looks like that may not work just at the moment.
> Hope this helps... and if I'm barking up completely the wrong tree
> about your problem, let me know :)
For the record I wasn't using jabberd2's shared rosters (I don't think
it was available when I first set it up) but rather I had a script that
populated the underlying MySQL tables to make it look like the users had
added each other to their rosters.
I wonder whether I could do the same thing here? Not being familiar
with Lua I'm not sure whether I could load the .dat file for each user
and modify it, or whether I could just overwrite the .dat file as if I
was writing out any old text file. I guess that would potentially lose
some user settings, but then I have a captive audience here so that may
not be too problematic.
What do you think?
Thanks again,
Adam.
I started making a script to demonstrate managing rosters via
Prosody's API for you. It grew into a small module for managing
rosters via prosodyctl, so it might just suit you as-is. Either way,
feel free to use or hack up the code however you want:
http://prosody.im/files/mod_roster_command.lua (instructions at the
top of the file)
Regards,
Matthew
Wow nice. It works *almost* perfectly as is - everyone gets added to
everyone else's roster but they're not split up into groups.
I've had a look at the code but I'm not quite sure how to add people to
groups. I can only see in mod_roster where it sets a group and then
pushes it out to other resources but I'm not quite sure how to apply
that to the rostermanager subscription process in mod_roster_command.
Any pointers?
Many thanks,
Adam.
Ok I think I figured this out. I've attached an updated
mod_roster_command.lua which adds a new command "rename". This both
sets the name to show in the roster (avoiding a list full of JIDs) and
adds people into the correct groups.
I'm not sure whether I've done it correctly or not, but it does work for
me. Hopefully (perhaps after fixing my mistakes) you'll include this
module in the official distribution too, it's very useful!
Thanks Matthew for the code that got me started as well :-)
Cheers,
Adam.
Excellent, thank you! I've uploaded this version to prosody-modules
for everyone to enjoy:
http://code.google.com/p/prosody-modules/wiki/mod_roster_command
Just let me know if you make any other changes, or would like access
to the prosody-modules repository to update it yourself.
Regards,
Matthew
--
You received this message because you are subscribed to the Google Groups "Prosody IM Users" group.
To post to this group, send an email to prosod...@googlegroups.com.
To unsubscribe from this group, send email to prosody-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/prosody-users?hl=en-GB.