Candy webclient with Openfire, not working complete - xmpp

I have set up the Openfire xmpp server and it's running good from a client, but i want to use candy with it to create a chatroom (muc), my settings in openfire work and so there is a conference.blabla.nl, that conference server i can connect with Pandion and Tkabber, i log in and ask what rooms are there or if i want to create one myself, that all go well.
When i connect with candy it only connects as i use a proper login name and pass, but i want it to join or create a chatroom on the muc.
When i login with proper username and pass my screen gets grey, but when i type something to the user logged in at candy there will appear that there are messages but only then, i can't read them in candy...
So to go short, i have candy up and running but shows only information when someone sends something.
Anyone knows about it or have some good tips what could work.
I just want a webclient that people can use with a own chosen name like "guest" or something and then log in to the chatroom.
Any help appreciated.

There are three possible options:
On initialization of Candy, specify autojoin with "true" and in the openfire server specify autojoin bookmarks.
On initialization of Candy, specify autojoin with an array of rooms to autojoin
use the roomPanel Plugin to discover existing rooms and be able to join them.
Btw. we have a support mailinglist as well

Related

Conversejs groupchat subscriptions (ejabberd)

I have been struggling to configure a group chat using conversejs and ejabberd. From the documentation I've stumbled across, it seems like it is possible to have a persistent group chat that users can be subscribed to, which will allow them to receive messages from the group chat while not present in the group chat.
For example: I would like to be able to simply close the group chat on my conversejs client, but still get notifications from that group chat.
This is a fresh ejabberd 21.04 and conversejs 7.0.6 install (using websockets).
What I tried to do was create a room through the conversejs client, and then add a subscription through the ejabberd cli:
ejabberdctl subscribe_room user#my.example.com/muc user test_room#conference.my.example.com urn:xmpp:mucsub:nodes:messages
One of the things I'm most confused by is the field in the configuration panel of a group chat that is titled "XMPP URI of Associated Publish-Subscribe Node." I have no clue how to format this, but have found a few clues online... What I have tried is a number of different configurations of something like:
xmpp:my.example.com?;node=messages
but I'm really just grasping at straws here.
If anyone can help me figure out what I'm doing wrong with this URI, or can show me a working example of this, that would be amazing. If what I'm trying to do simply isn't possible with XMPP, please let me know as well.
Thanks!
it is possible to have a persistent group chat that users can be subscribed to, which will allow them to receive messages from the group chat while not present in the group chat.
Exactly.
ejabberdctl create_room room1 conf.localhost localhost
ejabberdctl change_room_option room1 conf.localhost persistent true
ejabberdctl change_room_option room1 conf.localhost allow_subscription true
ejabberdctl subscribe_room user1#localhost User1 room1#conf.localhost urn:xmpp:mucsub:nodes:messages
Now I'll use the send_message API call to send a message to the room. This requires the sender to be online, so for this example register and login to admin#localhost. And of course, login to user1#localhost to receive the notification from the room. Those clients do not need to join the room.
ejabberdctl send_message groupchat admin#localhost room1#conf.localhost Sub Body

How to integrate with OpenFire XMPP server to receive roster info for users?

I need to create small auxiliary server that is part/integrates with OpenFire server in order to get roster for a given user.
I was looking for some plugin/api call that given the user JID to return his contacts and their online status.
All-in-all I may end up changing OpenFire's code but I was hoping that there is a easier solution
All though the links provided by Manasi would work for you. However those links refers to user service plugin which has been depricated by openfire.
They recommend to use REST API plugin.
You'll see list of all plugins here.
You should read about retrieving user roster and their presence .
You could try using the user service plugin of openfire that returns a host of information of the user as well as its rosters.
for documentation click here.
You can get the roster information by this url.

Laravel socket chat application

I'm new with web sockets, and i want to create a private chat with laravel between authenticated users and anonyme users , i'm not asking to give me the codes, i want a way to do that , i want to understand how can i do that
I'm thinking to that for a couples days ago, and i fount that i should make this steps :
1- Create chat with socket
2- intergrate it with laravel (1)
3- show connected users ( i don't know id if that i should make that with socket or with laravel framework )
4- fix the chat to make it private ( build some socket or somethink like that)
i want to know how i can do that ?
Thakns
https://packagist.org/search/?q=socket
If I were doing this, I would separate the sockets server and the frontend implementation.
This would allow you to scale both the dispatch and the client services at different rates.
You can use any library of your choosing, usually the best is going to be on the top.
http://www.sanwebe.com/2013/05/chat-using-websocket-php-socket
That explains it a bit more than I am willing to.
basically you will have one instance of laravel that is only responsible for rest/socket communication. It will provide the client(frontend) with the information that it needs.
When a registered user logs in, You simply notify your socket server via rest a user has logged in, In turn your socket server will query the db for all currently logged in users, trigger the event of UserLoggedIn , attaching perhaps an array of logged in users which would then be broadcasted to all of the listening clients.
When a client receives that notification, your js (if necessary) would update the list of available chatters with the one provided by the dispatch.
You will also need to maintain a list of active unregistered user socket connections so that you know who's where and who should get what message.
This is the general idea behind it.

Ejabberd: How to limit the fetching of jabber user directory (JUD)

I'm developing a client jabberd application for mobile(android) using (a)Smack.
Since, in my application, the users are registered by their phone numbers, the application should be able to recognize which contact has a jabber account on the server and suggest him/her for chatting.
After googlling the web I found that there is a jabber user directory (JUD) which I can use to check there is an account for a specific mobile number or not. (I'm using UserSearchManager).
My questions:
1- It seems that there is no record in JUD for a user who has not updated his vCard yet, so I cannot find him. Is there any solution to check the existence of this kind of users?
2- It seems that by using JUD, everyone outside of my application can fetch some important information of users such as mobile numbers, emails, etc. Is there any solution to limit JUD search engine? (for example, getting only "user field" as a input and returning only "full name field" of existing accounts or other useful limitation).
So by this way, I can recognize which person from the contact list has an account on the server and also other people cannot fetch important information of the exiting users.
Any command or advice is appreciated. Thank you.
I do not think it is possible as default, without customizing ejabberd application code.

Openfire: Create MUC Room with custom fields

First of all, I'd like to provide some background information: I want to exchange unstructured data between various clients using XMPP. Data sources are supposed to publish their data simply to Mulit-User-Chat rooms (XEP-0045) so that any interested client can register.
XMPP MUC services can have various chat rooms and in order to find the ones my data sources push information to, I'd like to set some custom identification for that room. I figured muc#roominfo_<custom_ident> with some custom value would be great to accomplish that.
For testing purposes I wrote an application that creates a MUC on an XMPP service. Authentication etc. all works fine. I am using Smack to communicate with the XMPP server and to create the room. When I create the room, I am adding a field to the form field I requested before containing my custom information. The MUC is created and accessible. Yet the created custom field is not returned when I perform a disco#info on the room's JID.
I tested this with a local installation of (3.8.2).
I just wonder, if this is an issue of Openfire, that custom form fields (XEP-0068 used here in XEP-0045) are not stored when the MUC is created or if it is just not allowed according to XEP-0045? I read the specification for MUCs and crucially the respective section but couldn't find any evidence that convinced me, that it is explicitly not possible to create such custom form fields for a MUC.
Maybe I just misunderstand something in the specification? Has anyone tried something similar and it's working? If it is an issue of Openfire, I could try a different XMPP server.