I'm trying to modify the Converse.js client to automatically bind an anonymous user to a moderator without login. If the client pops up, the user shouldn't get a login prompt but automatically connect to a logged in moderator.
Asked
Active
Viewed 2,065 times
2
-
Welcome to Stack Overflow! Please see here on how to ask a good question: https://stackoverflow.com/help/how-to-ask In your case, some code to reproduce your problem would really help us help you. – meenaparam Aug 22 '17 at 08:29
-
Also, if you have two questions - please create two questions. Discussing two questions at the same time doesn't work. So I suggest that you remove the last paragraph and put it up as a new question, with further details. – Wladimir Palant Aug 22 '17 at 08:52
1 Answers
0
You can try the auto_login configuration setting, possibly together with the credentials_url setting, so that the JID and password of the moderator are fetched automatically by converse.js.
For example, you'll then initialize converse.js like this:
converse.initialize({
'allow_logout': false,
'auto_login': 'true',
'auto_reconnect': true,
'bosh_service_url': 'https://bosh.example.org',
'credentials_url': 'https://example.org/credentials'
});

JC Brand
- 2,652
- 18
- 18
-
Thanks for the answer. But in my case I want to do this with SASL anonymous or i need a plugin on client site which generate a jid, which registers itself on log-in to the server and unregister after log-out. I'm not professional familiar with any programming language and maybe anybody else has doing this before. Otherwise I have to study the development guide from Converse.js. – Andre Semek Aug 28 '17 at 09:55
-
I don't think you can log in with SASL anonymous and then be logged in as a moderator. At least not with the general XMPP servers, although it might be possible if you customize your XMPP server. That said, I think that's a server issue, and not related to the client (e.g. converse.js). – JC Brand Aug 29 '17 at 09:00
-
The Moderator is already logged in. He is like an Agent and wait for a customer for example. On ejabberd i've created some virtual hosts and for each hosts also shared roster groups. It works, that the moderator immediately can see if a user logging onto his virtual host. But in my case i want to directly connect the anonymous user to the already logged in moderator and i don't know if I can do this on server side. – Andre Semek Aug 29 '17 at 09:28
-
-
HI :) There is only one admin/moderator/operator "Bender" (Bender@example.test1.com) on the virtual host "example.test1.com". If a anonymous user logs into the domain (or vh) "example.test1.com", he should be connected directly to "Bender" like any other anonymous user who logs into this domain. – Andre Semek Aug 30 '17 at 10:10
-
What do you mean with "connected directly to" ? Do you mean a chat window should open up, so that the user can chat with Bender? – JC Brand Aug 30 '17 at 15:44
-
exactly. like a support chat. the user connect to Bender and get an announcement. I've tried that with a muc but in a muc every one else can see each other and what the others write. – Andre Semek Aug 31 '17 at 09:03