Giter VIP home page Giter VIP logo

converse.js's Introduction

XMPP Chat CI Tests Bountysource bounties Translation status

Converse is a web based XMPP/Jabber chat client.

You can either use it as a webchat app, or you can integrate it into your own website.

It's 100% client-side JavaScript, HTML and CSS and the only backend required is a modern XMPP server.

Please support this project via Patreon or Liberapay

Demo

Converse is hosted and can be used at https://conversejs.org.

A demo showing anonymous login is available at https://conversejs.org/demo/anonymous.html and a demo which shows how you can embed a single chat room into a page is avialable at https://conversejs.org/demo/embedded.html.

Documentation

The developer/integrator documentation can be found at https://conversejs.org/docs/html.

You'll probably want to begin with the quickstart guide, which shows you how to use the CDN (content delivery network) to quickly get a demo up and running.

Converse modes

Overlay

In overlay mode, Converse appears overlayed chats on top of the website.

Screenshot of Converse in overlay mode

Fullpage

In fullpage mode, Converse behaves like a single-page app that covers the whole browser viewport.

Screenshot of Converse 9.0.0 in fullpage mode

Dark mode

Screenshot of Converse 9.1.0 with a dark theme

Embedded

In embedded mode, Converse can be embedded into an element in the DOM.

Screenshot of Converse in embedded mode

Features

  • Available as overlayed chat boxes or as a fullscreen application. See inverse.chat for the fullscreen version.
  • Custom status messages
  • Desktop notifications
  • A plugin architecture based on pluggable.js
  • Chat statuses (online, busy, away, offline)
  • Anonymous logins, see the anonymous login demo
  • URL Previews (requires server support, for example mod_ogp
  • Translated into over 30 languages

Supported XMPP Extensions

Integration into other servers and frameworks

XMPP servers

Other

Tests

We use behavior-driven tests written with jasmine.js.

Run make check to execute all the tests.

Licence

Converse.js is released under the Mozilla Public License (MPL).

Attribution

Emoji images are courtesy of Twemoji.

Support

Issues can be logged on the Github issue tracker.

Donations

A heartfelt thanks for everyone who has supported this project over the years. Many people have contributed testing, bugfixes, features and corrections.

We accept donations via Patreon and Liberapay.

Sponsors

BairesDev

Blokt Crypto & Privacy

Prime Sound

KeyCDN

converse.js's People

Contributors

aditoo17 avatar afuggini avatar aitzol76 avatar boffire avatar chaoskid42 avatar cmrd-senya avatar comradekingu avatar deleolajide avatar dependabot-preview[bot] avatar dependabot[bot] avatar gyulavitez avatar ichim-david avatar jcbrand avatar knixeur avatar licaon-kter avatar linkmauve avatar mako09 avatar nautilusx avatar oersen avatar ppjet6 avatar pzia avatar santossi avatar thierrytiti avatar ubermanu avatar weblate avatar worlword avatar xavifp avatar xmgz avatar yarons avatar zash avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

converse.js's Issues

Name replace by JID

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.

Thanks in advance.

Mayank Porwal

conflict

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.

Converse should throw events

I suggest that converse shoud notify events,
to allow developement of specific behaviour around chat base

I can suggest this list :

  • initialization
  • connection
  • open / close control box / chat box
  • status change
  • message received
  • message sent
    etc.

i can add those triggers

i can implement this

Wishlist: do not popup chat window automatically

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?)

Messages being kept after logout

  • Steps to reproduce:
    1. Logging as user A
    2. Send messages to user B
    3. Logout user A session
    4. Logging as user C
    5. Open a chat with user B
  • Expected behavior: A new and clean chat window to start chatting with user B
  • Current behavior: User C see all text messages send from user A to user B and vice-versa.

Providing a public api ?

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

implementing sound when new message arrived/send etc

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.

cannot call connection's handler

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) ?

Replace Burry.js with Backbone localstorage

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.

Remember chat window positions

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.

IE support

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.

Message sent to MUC from converse.js appears as 'undefined' in clients that supports HTML

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>

No send message/MUC Options.

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 ...

Showing avatar image next to the contact's name under "My contacts"

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.

Error: ""Cannot read property '$el' of undefined" when set prebind = true

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

Initiate chat window from link outside the converse chat box

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.

Disconnecting from server with prebinding

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

... is typing is not internationalized

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 ? :))

POST http://domain.tld/undefined 404 (Not Found)

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>

Problems with pre-bind

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?

Handling disconnections with prebind

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?

Avatar image in vCard

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.

Converse.js CSS classes clashing with bootstrap

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!

XHR User Search

Two questions regarding XHR User Search.

  1. Where should we set the portal_url variable? Is it a config variable for converse?
  2. What should be the response of the search-users service?

Issue with prebind

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

Default status Offline?

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

Problem with the chat hour

When you send a message to someone the time of the message goes with a missing number like the example below:

  • I send a message at 02:39 PM and at the chat window the time goes like 02:3

Error: the 'from' attribute must be set to the user's full JID

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".

Closing a chat window requires to clicks in the close button [0.6.x]

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.

Debuging install

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?

prebind and show_controlbox_by_default true fails

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.

disable add user functionality

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!

Receiving a contact request would result in the contact name: [object Element]

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 👍

Don't break when server doesn't support vCards

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 more metadata files in order to ease external contributions

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:

  1. A contribute.md file described here https://github.com/blog/1184-contributing-guidelines to highlight the steps that would need for any code to be merged, like the details that you should ensure that the jasmine tests are not failing
  2. A changes.rst to highlight any new commit changes
  3. A tagging system perhaps following that of collective.xmpp.chat in order to provide people a known good set

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.