conversejs / converse.js Goto Github PK
View Code? Open in Web Editor NEWWeb-based XMPP/Jabber chat client written in JavaScript
Home Page: http://conversejs.org
License: Mozilla Public License 2.0
Web-based XMPP/Jabber chat client written in JavaScript
Home Page: http://conversejs.org
License: Mozilla Public License 2.0
Hello,
After login the default status is Offline.
How I can change the status to Online via JS, so the messages start flowing right after the user login.
Regards
I login my xmpp server successfully with account A. I send a message to another xmpp client with account B. B receive and display it. But when I send a message from second client to conversejs client, conversejs cannot display it.
However, I can see the response data in the Firebug of firefox brower:
<body xmlns='http://jabber.org/protocol/httpbind'><message xmlns="jabber:client"
id="chat_2743" type="chat" to="250240010078@gfzq" from="landonghua@gfzq/CoWork"
time="2013-06-24 18:34:14"><body fontBold="false" fontItalic="false"
fontUnderline="false" fontSize="12" fontColor="#000000">hello world</body></message>
</body>
It seems like that converse.js cannot call the conncection handler, added by addHandler(callback, null, 'message',null) ?
Edit: Sorry, did not see that issue #11 already asked for this.
I was thinking that this package has gotten quite a few changes and even though the readme states that this is not production ready, you can use it right now without fearing that this is a total mess.
In order to ease though contribution we should add the following:
how can i get it work? tks
I'm using converse.js in some contexts where bootstrap is present and the problem is that some css class names clashes (for example dropdown
).
I believe that a reasonable fix for that would be to prefix all css classes that conversejs use (ie. conversejs-dropdow). That would avoid future clashes with other libs as well.
Cheers!
This is how converse.js send a message 'blahhhh' to a MUC. It renders fine in clients that doesn't support html (another converse.js client). But the message appears as 'undefined' in clients that supports HTML (Pidgin).
I can also reproduce this on the demo at conversejs.org.
<body rid='20267057' xmlns='http://jabber.org/protocol/httpbind' sid='1120efce-5a42-4ebb-8a82-741ba315cbab'>
<message to='redacted' from='redacted' type='groupchat' id='2610' xmlns='jabber:client'>
<body xmlns='jabber:client'>
blahhhh
</body>
<html xmlns='http://jabber.org/protocol/xhtml-im'>
<body xmlns='http://www.w3.org/1999/xhtml'>
undefined
</body>
</html>
<x xmlns='jabber:x:event'>
<composing/>
</x>
</message>
</body>
Hello again.
Converse.js is working okish, but I have an issue with MUC: I can list rooms, can join them and see the converstion, but enter in MUC window is not working and I can't send messages. Also can't close the MUC window once open and can't open MUC options.
There are no console log messages for this issue. And this issue is not present in any other Converse.js "window"/container - I can open and send messages to users, can close Roster window ...
When you send a message to someone the time of the message goes with a missing number like the example below:
Version 0.2 released: https://pypi.python.org/pypi/django-conversejs
I am using converse.js with openfire 3.8.2.
When I start chat with a friend first time its showing his name on connection list and also on chat window, but when I reload the page or reopen the chat window and then check his name in connection list then its showing JID.
Please help me to fix this issue.
Mayank Porwal
Could someone suggest how to make conversejs to show the the avatar image of of the person you are chatting with? The demo video shows it is working when the demo user is talking to GTalk. I can't make it work by using xmpp4r to set the vCard:
vcard = Jabber::Vcard::IqVcard.new
vcard['FN'] = user.name
vcard['NICKNAME'] = user.first_name
vcard["PHOTO/TYPE"] = "image/png"
image_file = File.new(user.avatar.path(:thumb), "r")
vcard["PHOTO/BINVAL"] = Base64.encode64(image_file.read())
helper = Jabber::Vcard::Helper.new(client)
helper.set(vcard)
Thank you.
The steps described here [1] doesn't work because build.js isn't present anymore.
[1] http://conversejs.org/docs/html/index.html#minifying-javascript
I suggest that converse shoud notify events,
to allow developement of specific behaviour around chat base
I can suggest this list :
i can add those triggers
i can implement this
This would be very useful to access information computed in converse.js
(for example, the list of users)
and directly access to chat controls from outside (send a message, open a box) to customize behaviour and implementing specific behaviours without having to fork.
What do you think about extending public methods (for now we just have 'initialize' with extra ones (i can make a first draft) ?
Thanks
Thomas
Almond is a smaller replacement AMD loader (about 1Kb when gzipped) that can be included instead of RequireJS when you make your optimized build.
It should reduce the overall size of the optimized converse.js build.
Steps to reproduce:
1- Login
2- Select a contact to open a new chat window
3- Click on the X to close the chat window
Expected behavior: The window should close.
Actual behavior: The window remains open until a second click is given.
Chrome and Firefox behaves same way running Converse.js 0.6.x. newest changeset.
It would be a good addition to remember the chat window positions ( collapsed / expanded ).
So on a page reload everything returns as when before the user reloaded the screen.
Hello,
Sorry but I'm trying to install Converse.js on PHPBB3.
Basicly - I'm unable to initilize converse.js from within the board. I can start it from every other place.
Is it possible that converse.js is having an issue with jQuery 1.10.2 and jQuery-UI and it is unable to initilize. I get no messages in the error console ... could you give some guidelines?
Hi i am working with prebind . when i reload the page then i am getting status as disconnecting . I keep jid,sid and rid in localStorage i am using those values in initialization of converse .
Thanks in advance
Hi! jcbrand!
Is that possible to get converse.js work with iE?
I'm tring to remove the localstorage part, and failed.
Any suggestion?
Thank you very much ! and also aplogize for my poor english.
๐ฏ
IF you have 10+ chat conversations open I noticed the windows will truncate on the screen ( no more visible ) is there a better way to handle this? Not sure how Facebook does this.
I look at converse a year a go, amazing what you did to it!
Could you please clarify how to disable the add user functionality?
On what xmpp protocols does it depend and what is needed to remove it fully?
On a sidenote, do you plan to implement some sort of smiley picker and smiley support? Something like http://candy-chat.github.io/candy/ ?
Big thanks for this great chat!
Implementing sound when new message arrived/send etc
I plan to contribute to your project in short run I have development env setup and will contribute some patches.
What would be suggested format?
Perhaps some plugin structure would be a good suggestion so you can keep core clean.
I also removed several code for my custom version ( like rooms ) since im planning on using this to implement an instant messenger feature in my social media type rails application.
Currently, to remember which chat boxes were open upon page reload, they are saved to localstorage via Burry.js.
Chat boxes are already backbone models, so we can rather persist them directly to localstorage.
http://backbonejs.org/docs/backbone-localstorage.html
The same goes for vCards information. We can persist the RosterItem models to localstorage, and in so doing, have a cache of contacts' vCard info.
The only thing that will then still be in Burry.js would be chat messages.
When i use a converse.js in my website, its throwing the conflicts with jquery UI components. Can you help me out?.
Thanks in advance.
I login two gmail account on conversejs home page respectively.
When [email protected] send a message "hhhhhhhh" to [email protected]. A will get a response with content:
<body xmlns='http://jabber.org/protocol/httpbind'><message xmlns='jabber:client'
to='[email protected]' from='[email protected]' id='1371872729498' type='error'>
<body>hhhhhhhh</body><active xmlns='http://jabber.org/protocol/chatstates'/>
<error code='400' type='modify'>
<bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>
If set, the 'from' attribute must be set to the user's full JID.</text>
</error></message></body>
[email protected] can see "[email protected] is typing", but cannot receive the message "hhhhhhhh".
Two questions regarding XHR User Search.
Hi guys.
Me again. I've maid Converse.js to work. Even managed to get BOSH PreBind to work. Now I have this problem (on console) on load converse.js sends:
<body rid="1215407446" xmlns="http://jabber.org/protocol/httpbind" sid="eea3dfdc8566a4221bd380b823d7cbe1c14a9d38">
<presence xmlns="jabber:client"></presence>
<ig type="get" id="6137:roster" xmlns="jabber:client">
<query xmlns="jabber:iq:roster"></query>
<iq>
</body>
The server response is:
POST http://domain.tld/undefined 404 (Not Found)
When I try to list rooms, the request is:
<body rid="1215407446" xmlns="http://jabber.org/protocol/httpbind">
<ig to="conference.chat.domain.tld" from="[email protected]" type="get" id="6138:sendIQ">
<query xmlns="http://jabber.org/protocol/disco#items"></query>
<iq>
</body>
The response is the same.
Is this issue related to PreBind and how should I resolve it. As I can't access the list of rooms ... and I can't join any. This issue is not present with non prebind sessions.
And this is how I start the converse with prebind:
<script>
require(['converse'], function (converse) {
converse.initialize({
auto_list_rooms: false,
auto_subscribe: true,
bosh_service_url: 'http://chat.domain.tld/http-bind/', // Please use this connection manager only for testing purposes
hide_muc_server: false,
i18n: locales['en'], // Refer to ./locale/locales.js to see which locales are supported
prebind: true,
show_controlbox_by_default: false,
xhr_user_search: false
});
var connection = new Strophe.Connection(converse.bosh_service_url);
connection.attach('[email protected]', 'eea3dfdc8566a4221bd380b823d7cbe1c14a9d38', '1424222331', function (status) {
if ((status === Strophe.Status.ATTACHED) || (status === Strophe.Status.CONNECTED)) {
converse.onConnected(connection)
}
});
});
</script>
I get NS_ERROR_NOT_INITIALIZED: Component not initialized after i try to get the roomlist.
I think its related to XMLHTTP Requests while some others are pending.
Can someone show me the starting point in the code to make the avatar image from vCard being shown next to the contact's name under "My contacts"? I'm just trying to make it more like Facebook style and "socialized" by seeing the contact person image next to the name.
Thank you.
We have a few case here where the 'popular' guys weren't able to do any work because chat windows keep on popping up.
My suggestion is that when a message coming in, converse.js provides a visual feedback in the form the message '4 unread message' next to the 'online contacts' button. clicking it will open the 'online contacts' tab with contacts with unread messages moved up and with appropriate icon next to them (blinking letter icon?)
Used jappix.com as server, created 2 accounts, one would add the other, the added will get the request from: [object Element] and communication would not work
screenshot: http://www.webpagescreenshot.info/img/51bf6e9790f288-24232949
After a reconnect, communication is possible but contact name is messed up. See screenshot
http://www.webpagescreenshot.info/img/51bf6f06714a12-82372315
Btw, I love your work! It's really awesome ๐
ConverseJs don't work on IE 8
OTR is a cryptographic protocol that provides strong encryption for instant messaging.
The latest protocol specification is here:
There exists a Javascript library otr.js here:
Hi jcbrand, thanks for converse.js it's very useful for me, btw i have issue from your plugin when I set prebind = true in main.js i got error "Cannot read property '$el' of undefined" in chrome console & "converse.rosterview is undefined" in firefox console, and subview rosterview can't rendered in contact panel view. thank you
Hi
"${fullname} is typing..." is not internationalized
i'd like to fix it myself. What is the procedure to add a message in locale files ?
Thank you !
(thank you for getting back my french translation in this package. I
suppose that i should have set them here first...
can you add french translation notice in changelog please ? :))
I have a requirement, where in I want to initiate the chat window, when a user click the link along a profile. That would initiate the chat window. Is it possible?
If i have the sid, rid, jid of the user ( the one who wants to chat) + the jid of the user whom i want to chat, can it be done.
I am implementing the Converse.js, doing pre-bind with a XMPP library in PHP. Seems to be working well. I followed all the steps of the documentation, and it worked, but not appear in the contacts list. It authenticates the session usually in Openfire just is not showing the contacts.
main.js:
require(["jquery", "converse"], function($, converse) {
var BOSH_URL = 'http://192.168.0.124/http-bind';
var connection = null;
$.ajax({
url: '?action=getBind',
dataType: 'json',
success: function (data) {
var connection = new Strophe.Connection(BOSH_URL);
connection.attach(data.jid, data.sid, data.rid, function (status){
if ((status === Strophe.Status.ATTACHED) || (status === Strophe.Status.CONNECTED)) {
converse.onConnected(connection)
}
});
}
});
converse.initialize({
auto_list_rooms: false,
auto_subscribe: false,
hide_muc_server: true,
i18n: locales.pt,
prebind: true,
rosterview: false,
show_controlbox_by_default: false,
xhr_user_search: false
});
});
Do not know why either, but in the console strophe is firing requests every second. Does anybody know what can be?
I haven't looked at this extensively myself, but received an email from someone who ran into problems when his Prosody server was set up without vCard support.
Converse.js should also be usable even if the XMPP server doesn't support vCards.
The best way to solve this will likely be to extend the existing feature detection functionality to check if the server supports vCards and to take appropriate measures in case it doesn't.
Add a configuration setting that makes multi-user chatrooms optional.
It would be nice if the user list would have an option ( userlist_avater = true ) for adding avatar images in the user list.
Image source could be easy set like /users/get_avatar/1 for easy integration into existing app
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Creating this ticket as a reminder. I noticed this while testing something else.
I'm using conversejs on a website that uses Nginx and ejabberd. However, on occasions, Nginx throws a 504 error and results in disconnection. On my webpage, I'd like to capture this event and trigger prebind again to automatically reconnect the web client. Is it possible to capture the disconnect event and use that to reconnect?
Hi there,
I am integrating conversejs to my rails application. I am facing a peculiar issue, for which i couldn't find the reason so far. When i directly log in, through the form provided. Everything works fine, i get to the see whos online and even what chat that person, and also to other converjs clients in my website.
When i do the same with prebind. I can't see any one online, everyone will be marked as offline. But when i try to chat with the use who is shown as offline, but is actually online through my desktop client, the messages does reach. And I am able to reply as well. But when i try to chat with other users, who are online via converjs, its not working.
My jabber server is prosody, i am using the backed library called xmpp4r, the session id, rid all looks fine.
Converse configuration
require(['converse'], function (converse) {
$.getJSON('/prebind', function (data) {
converse.initialize({
auto_list_rooms: false,
auto_subscribe: false,
bosh_service_url: 'http://example.com/http-bind',
hide_muc_server: false,
i18n: locales.en,
prebind: true,
jid: data.jid,
sid: data.sid,
rid: data.rid,
show_controlbox_by_default: false,
xhr_user_search: false
});
});
});
My ruby backend code
def prebind
require 'xmpp4r/httpbinding/client'
@client = Jabber::HTTPBinding::Client.new(current_user.jabber_id)
@client.connect("http://example.com/http-bind")
@client.auth(current_user.jabber_password)
respond_to do |format|
msg = { :jid => @client.instance_variable_get("@jid").inspect, :sid => @client.instance_variable_get("@http_sid"),
:rid => @client.instance_variable_get("@http_rid"), :bosh_service_url => 'http://example.com/http-bind' }
format.json { render :json => msg }
end
end
Using the following initialize gives me an TypeError: converse.rosterview is undefined @converse.js:647
require(["jquery", "converse"], function ($, converse) {
$.ajax({
'url': '/conversejs/bind/',
'success': function (data) {
converse.initialize({
prebind: true,
show_controlbox_by_default: true,
});
connection = new Strophe.Connection('https://bind.opkode.im');
connection.attach(data.jid, data.sid, data.rid, function () {
converse.onConnected(connection);
});
}
});
});
Setting show_controlbox_by_default
to false fixes it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.