converse.js | Web-based XMPP/Jabber chat client written in JavaScript | Chat library
kandi X-RAY | converse.js Summary
kandi X-RAY | converse.js Summary
Web-based XMPP/Jabber chat client written in JavaScript
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of converse.js
converse.js Key Features
converse.js Examples and Code Snippets
Community Discussions
Trending Discussions on converse.js
QUESTION
I am using converse.js to provide chat functionality. I am looking for a way to add reply to specific chat room message. any one know how can i do that?
for example: in group user1 send: hello and user2 wants reply to this message and say hello to
my initial code:
...ANSWER
Answered 2021-Feb-06 at 15:19Finally I find way to solve this problem.
first in convers.js/src/plugins/chatview/view.js add this before onMessageEditButtonClicked:
QUESTION
I'm new to XMPP. I do receive messages with the body but I'm also receiving many of them without a body.
I'm preparing a demo for the iOS platform.
What kind of messages are these and in what way it's helpful?
...ANSWER
Answered 2020-Aug-07 at 11:49This is a message that comes from the message archive (a pretty old implementation as it still uses elements which have been used in 2013 and were removed just one year later).
The outer message (id=1596108476932101) is the carrier message which is used to forward the inner, archived message to you.
The inner message (id=id9c6b26dd-50dc-467c-a436-dd1e16af05fe) contains a delivery receipt () that tells your contact
mayur@xmpp.server.io
that another earlier message (id=idcb348164-9a0b-4b9b-b351-03c97341fe91) has been received successfully.
So basically the whole construct is a MAM query result containing an archived message that carries a ´` marker.
While this particular message is not very useful for you, archived messages without body could come in handy in some situations, so you should not ignore all of them. For example archived messages containing chat markers could be used to sync up which messages have been read by any of your clients.
QUESTION
I have one machine that runs an Elgg portal, which contains a plugin that untilizes converse.js as XMPP-client and on the same machine I run a ejabberd XMPP-server.
Normal operation would be that the plugin synchronizes users/password/details from Elgg portal to ejabberd-server. This fails with the following error message:
...ANSWER
Answered 2020-Jul-14 at 15:33A few weeks ago I checked how configuration works, and updated the documentation acordingly. Try the example configuration provided in https://docs.ejabberd.im/admin/configuration/listen/#ejabberd-xmlrpc
QUESTION
Im actually developing a custom ERP for my business company and i need implement xmpp web based chat applicatión using Converse.js.
But i can't find any solution to manage events callback's with the api.
According to the documentation, the following syntax should be used:
_converse.api.listen.on('message', function (messageXML) { ... });
OR
converse.api.listen.on('message', function (messageXML) { ... });
But "converse.api" it's undefinied
Converse.js version 6.0.1
I hope your valuable help.
Sorry for my bad english
...ANSWER
Answered 2020-Jul-12 at 13:21Conerse.js has a public (i.e. globally accessible) API, which is available via the converse global. The most used method there would be converse.initialize.
Most API methods are however restricted to the private (i.e. closured) _converse object (note the leading underscore) and is available via _converse.api.
You can only access _converse.api
if you register a plugin.
For example:
QUESTION
This is a statement from converse.js documentation.
auto_join_rooms
...ANSWER
Answered 2019-May-14 at 06:10[{'jid': 'room@example.org', 'nick': 'username1' },{'jid': 'room@example.org', 'nick': 'username2' }, {'jid': 'room@example.org', 'nick': 'username3' }, {'jid': 'room@example.org', 'nick': 'username4' }, {'jid': 'room@example.org', 'nick': 'username5' }]
QUESTION
Is it possible to receive custom stanzas in converse.js?
I tried to listen
to incoming messages:
ANSWER
Answered 2018-Feb-18 at 11:11I'm not sure why a message
event isn't triggered for your custom message. There must be some assumption in the converse.js code which your custom message doesn't fulfill.
Converse.js uses Strophe.js under the hood, so you can use Strophe's addHandler to register an event handler on a lower level.
Here's how you would do this:
QUESTION
I've wrote a XMPP Server on C#, based on another (OPEN SOURCE) project. That project had a lot of handlers that help me work the XMPP Protocol, but did not have a BOSH Connection manager - so i wrote one.
The idea was to use the standard clients (via TCP Connection) and a Converse.JS on a browser.
The standard clients are working fine, but the Converse.JS had issues. My problem is not handling the bosh requests themselves, but handling the initial OPTIONS request that Converse.JS sends (with an empty body).
According to their forum (where i posted this Issue) the
The OPTIONS request is a so-called preflight request to determine whether the domain being queried supports CORS. IIRC this only happens when making cross-domain requests. If you intend to support CORS, then you'll need to respond appropriately to OPTIONS requests.
And studing that a little, i came up with this solution (that is not working, since Converse.JS keeps sending the OPTIONS request over and over, until it fails to connect):
...ANSWER
Answered 2018-Jan-24 at 17:08Just for future references - the problem was not in this function; the function i used to detect if the request was null that was wrong and returned true every time.
Problem solved.
QUESTION
I am trying to build Converse.js on my Windows machine. I have installed all required pre-requisites as mentioned on the website. However i am getting issue while building a code. Can someone please help me with the steps to resolve?
Here is the issue
...ANSWER
Answered 2018-Jan-18 at 14:17I finally resolved my issue. Issue was due to incompatible version of NodeJS. As @Himanshu sharma suggested in the reply, i checked last build of cinverse.js which was at aug 8' 17 and found the NodeJS releases before that. Once i installed the appropriate version of NodeJS, i could resolve issue. In my case, it worked with version node-v4.8.4-x64
QUESTION
I'm trying to configure a few settings in a converse.js chatbox (title, removing avatar, chatbox width) PRIOR to it "rendering" and displaying the chatbox.
While not explicitly saying so, I had figured that the "chatBoxInitialized" event would fire AFTER the chatbox object was created, but prior to rendering and displaying.
What I'm finding is that when my handler function for that event is called, the chatbox is already displayed, so clearly my understanding of "chatboxinitialized" is incomplete. Inside the handler, I have used available methods in chatbox object such as
...ANSWER
Answered 2017-Dec-03 at 10:25If you look at the code, you'll see that chatBoxInitialized
gets triggered after the chatbox's HTML has already been rendered.
Looking at the code, I don't see any event that's triggered after the chatbox has been created, but before it's rendered.
However, in the current master branch of converse.js (to be released soon), you can set the fullname after the chatbox has been created, and it will then appear properly.
You're however setting it wrong. With Backbone.js you must use get
and set
and not the attributes
property.
So this:
QUESTION
I'm looking into ways to open a chat window with a user via the API.
I have set up (and registered in the whitelist) a plugin, which triggers.
...ANSWER
Answered 2017-Oct-31 at 17:03Firstly, Converse.js doesn't allow opening chats with users who aren't in your roster (unless you have set allow_non_roster_messaging to true
). So make sure the user you're trying to chat with is in your roster.
Secondly, right after the connection
event has been fired is still too early to try and open chats.
So you have to first wait until the roster has been populated. This is the rosterContactsFetched event/promise.
Besides that, it's a good idea to also first wait until already opened chat boxes (which are cached in sessionStorage) have also been fetched from the cache. This is the chatBoxesFetched event/promise.
These two events fire only once per session, so they're also available as promises.
To first wait for these two promises to resolve, you're code would therefore look like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install converse.js
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page