JavaScript-based multi-user chat client for XMPP.

Related tags

javascript chat xmpp
Overview

Note: This project is dead and not maintained anymore.

Candy — a JavaScript-based multi-user chat client

Build Status Coverage Status

Visit the official project page: http://candy-chat.github.io/candy

Features

  • Focused on real-time multi-user chatting
  • Easy to configure, easy to run, easy to use
  • Highly customizable
  • 100% well-documented JavaScript source code
  • Built for Jabber (XMPP), using famous technologies
  • Used and approved in a productive environment with up to 400 concurrent users
  • Works with all major web browsers including IE9

Plugins

If you wish to add new functionality (to your candy installation) or contribute plugins, take a look at our plugin repository.

Support & Community

Take a look at our FAQ. If it doesn't solve your questions, you're welcome to join our Mailinglist on Google Groups. You don't need to have a Gmail account for it.

githalytics.com alpha

Issues
  • Future of the candy project

    Future of the candy project

    Hi all

    As you might have seen, i released a new candy version today. Candy as well as candy-plugins have been merged into master. Tbh i didn't test much and that's why i'm opening this discussion. Neither me nor @pstadler have contributed significant changes in the past year or so. We have been busy with work and free time and aren't using XMPP that much anymore to maintain an awesome software project as candy is.

    I propose to give the lead of the project to anyone who's willing to step in. I'd remove the dev branch and just commit to master / make prs to master.

    I'd propose to give the lead to @benlangfeld, @melissanoelle and @bklang.

    What's your opinion?

    opened by mweibel 37
  • Testing

    Testing

    This makes a start on some automated testing per #212.

    This PR is based on #273. That should be merged first.

    TODO:

    • [x] Tests during development grunt watch using PhantomJS w/ Selenium Standalone Server in the Vagrant box for speed
    • [x] More unit test coverage
    • [ ] Integration tests
    opened by benlangfeld 29
  • Support Nickname changing

    Support Nickname changing

    We should provide an easy way to support nickname changing.

    Basicly there are two steps to do:

    1. Support e.g. Candy.Core.Jabber.Action.NicknameChange
    2. Maybe also something in the gui, although this could be done with a plugin or so
    Feature 
    opened by mweibel 28
  • Add option to prevent private rooms

    Add option to prevent private rooms

    See mailinglist

    We should discuss how to do it/whether we should do it.

    In progress Plugin API 
    opened by mweibel 22
  • Track main roster in Candy

    Track main roster in Candy

    This adds a main roster to Candy to track user contacts, based on the Strophe roster plugin. It also fetches the roster on connect/attach in order to comply with RFC6121. This is just the basics, more is coming later today:

    • [x] Roster versioning
    • [x] Aggregate presence for a user for display in the UI.
    • [ ] VCard data maintained for roster entries as the basis of a user profile view
    • [x] Association between Candy.Core.Contact and Candy.Core.ChatUser models where we have a MUC user's real JID (Candy.Core.ChatUser.getContact()).
    • [ ] Inclusion of Candy.Core.Contact or Candy.Core.ChatUser instance in events where we currently pass around only a JID, to allow for more intelligent implementation of one-on-one chats with contacts.
    opened by benlangfeld 21
  • "Room Occupants" count increased sometimes when a user leaves the room.

    I'm not sure if this because I have a user in my user list with escape sequences in their name. (we're running mod_auth_phpbb3.lua with Prosody to allow users with spaces etc in their names to still authenticate. They are automatically escaped... so "Joey Vega" would end up as "Joey\20Vega" etc. http://prosody.im/pastebin/41b9deec-7ebc-4f7a-85c2-57bd9668c075 )

    I thought this only appeared in Firefox, but I now see it in both Chrome and IE9 as well... so apparently it's not just Firefox.

    http://i32.photobucket.com/albums/d12/phreadom/roomcount5.png

    And right now there are 8 people in the room, but it shows 30 etc. (Chrome and IE each show 24, since I joined with those later)

    What suggestions would you have for how I might track this down? I don't see anything immediately suspicious in the Firefox web console log.

    I have a number of other issues to work out with the escaped username, but I haven't started tackling that yet. (for instance you can't private message them. but I'll file those in a separate issue.)

    Bug 
    opened by jstressman 20
  • UI/UX tweaks

    UI/UX tweaks

    Message Pane

    • better readability (alternating colors, borders, more space ... ?)
    • highlight links in messages
    • better visualization of long nicknames

    Modal Window

    • fix bad contrast (tooltips should match)
    • pimp form elements
    • decrease font size?
    • highlight error messages somehow? (should have no impact on JS side)

    Message Form

    • Fix #49
    Tweak 
    opened by pstadler 20
  • Users with spaces

    Users with spaces

    Created a few mock users with spaces in their user name. This is allowed in OpenFire, and to make sure it wasn't just a bug with OpenFire, I used their client Spark to test them out. It is a valid username. Candy does not allow logging in with a user name with any spaces; at least not from my testing. It would be a nice feature to be able to do so.

    Bug 
    opened by jeotic 19
  • Candy should be able to reconnect on its own after temporary loss of network connection

    Candy should be able to reconnect on its own after temporary loss of network connection

    Right now endless "Disconnect" overlay with spinner is displayed, until URL is manually reloaded. I imagine this can be improved?

    Tweak 
    opened by lkraav 19
  • Message Echo?

    Message Echo?

    This may well be an ejabberd issue, but I thought I'd mention it here in case anyone had insights...

    I'm seeing an issue where occasionally I will send an outgoing chat message appear once in my chat list when I send it, and then appear against a minute later. It happens only for the client sending the message. After some testing, it seems only to happen in situations where there are no intervening messages; during an actual back and forth it never seems to happen.

    Not sure if this is a bug in candy or in ejabberd. I'll try to do some more debugging when the room quiets down to see what the xmpp messages look like and see if another message is coming from the server or not. Will update with more data soon!

    opened by drewww 19
  • Candy should respond to XMPP application-level pings (XEP-0199)

    Candy should respond to XMPP application-level pings (XEP-0199)

    https://xmpp.org/extensions/xep-0199.html

    Currently, it doesn’t, and the client is disconnected by a server that requires this.

    opened by michalrus 5
  • migrating from webchat.war, openfire, fastpath

    migrating from webchat.war, openfire, fastpath

    Can candy replace webchat.war functionality like this. Client puts not mandatory credentials on a popup gets assigned one of the users in the 'chat group' group and chat enabled between the user and the client. If there is one user in the room, the 2nd client is holding. (Not a room chat where clients can see each others messages)

    chat

    (sorry for not asking this on the mailing list, but google just sucks, thinks i can read everything in polish)

    opened by f1-outsourcing 1
  • XEPs and RFCs support page with version

    XEPs and RFCs support page with version

    It is possible to have a XEPs and RFCs support page with version (XEP-XXXX v1.2)?

    Same for plugins too: https://github.com/candy-chat/candy-plugins

    Examples:

    • https://github.com/UWPX/UWPX-Client/blob/master/README.md
    • https://github.com/telldus/xmppjs-client-plugins/blob/master/README.md
    • https://github.com/ortuman/jackal/blob/master/README.md
    • https://profanity-im.github.io/xeps.html
    • https://metronome.im/supported-xeps-list
    • https://dev.gajim.org/gajim/gajim/wikis/help/GajimXEPSupport
    • https://github.com/jappix/jappix/blob/master/PROTOCOL.md
    opened by Neustradamus 0
  • failed: Error during WebSocket handshake: Unexpected response code: 404

    failed: Error during WebSocket handshake: Unexpected response code: 404

    Hi, I have prosody server with nginx set up on my localhost, which run fine together with other xmpp web clients like converse.js. But I'm banging my head to make Candy chat working, as I get this error, whatever configs that choose:

    WebSocket connection to 'ws://127.0.0.1:5280/http-bind' failed: Error during WebSocket handshake: Unexpected response code: 404

    Here is my config index.html:

    		$(document).ready(function() {
    			Candy.init('ws://127.0.0.1:5280/http-bind', {
    				core: {
    					debug: true,
    					autojoin: true
    				},
    				view: { assets: '../res/' }
    			});
    
    			Candy.Core.connect('localhost');
    		});
    

    And /etc/nginx/sites-available/default :

    
    server {
            listen 80 default_server;
    
    location / {
            root /home/me/candy;
            index index.html;
    
            location /http-bind/ {
                    proxy_pass https://127.0.0.1:5280/http-bind/;
                    proxy_buffering off;
                    tcp_nodelay on;
            }
            error_page  405 =200 $uri;
    }
    }
    
    

    And /etc/prosody/prosody.cfg.lua:

    modules_enabled = {
    "roster";
    "saslauth";
    "tls";
    "dialback";
    "disco";
    "version";
    "uptime";
    "time";
    "ping",
    "register";
    "posix";
    "bosh";
    };
    allow_registration = true;
    daemonize = true;
    consider_bosh_secure = true;
    cross_domain_bosh = true;
    pidfile = "/var/run/prosody/prosody.pid";
    c2s_require_encryption = false;
    authentication = "internal_plain"
    log = {
    debug = "/var/log/prosody/prosody.log";
    error = "/var/log/prosody/prosody.err";
    
    { levels = { "error" }; to = "syslog";
    };
    }
    VirtualHost "localhost"
    enabled = true
    ssl = {
    key = "/etc/prosody/certs/example.com.key";
    certificate = "/etc/prosody/certs/example.com.crt";
    }
    VirtualHost "anonymous.localhost"
       authentication = "anonymous"
    Component "component.localhost"
    component_secret = "supersecretpw"
    
    Component "chat.localhost" "muc"
    

    Browser console error log:

    [Init] Debugging enabled
    candy.bundle.js:202 [Connection] Connecting
    libs.min.js:2 WebSocket connection to 'ws://127.0.0.1:5280/http-bind' failed: Error during WebSocket handshake: Unexpected response code: 404
    _connect @ libs.min.js:2
    connect @ libs.min.js:1
    a.connect @ libs.min.js:2
    a.connect @ candy.bundle.js:320
    (anonymous) @ candy.bundle.js:4197
    dispatch @ jquery.min.js:5
    v.handle @ jquery.min.js:5
    candy.bundle.js:234 [Strophe][ERROR]: Websocket error [object Event]
    k.debug.b.log @ candy.bundle.js:234
    error @ libs.min.js:1
    _onError @ libs.min.js:2
    candy.bundle.js:202 [Connection] Failed (2)
    candy.bundle.js:234 [Strophe][INFO]: _doDisconnect was called
    candy.bundle.js:234 [Strophe][INFO]: WebSockets _doDisconnect was called
    candy.bundle.js:202 [Connection] Disconnected
    candy.bundle.js:234 [Strophe][ERROR]: User connection callback caused an exception: TypeError: Cannot read property 'indexOf' of null
    k.debug.b.log @ candy.bundle.js:234
    error @ libs.min.js:1
    _changeConnectStatus @ libs.min.js:1
    _doDisconnect @ libs.min.js:1
    _disconnect @ libs.min.js:2
    _onError @ libs.min.js:2
    candy.bundle.js:234 [Strophe][INFO]: Websocket closed
    

    This problems bugs me for sooo long. So appreciate your hints to resolve it.

    Thanks

    opened by k0fi 1
  • Candy.Core.connect form change after disconnect

    Candy.Core.connect form change after disconnect

    I'm using candy in my web server to connect in my public room from openfire server. I'm using Candy.Core.connect('jid') option to login. All works fine, but when I logout from room (pressed 'X' near room name) the connection form will be the defoult ones (User/Pass required). Why I get this issue and how can I fix it?

    EDIT: Even if I fail to put 'jid' password it changes the form to default

    opened by TheEnigmist 0
  • Feature: Sound on message (public)

    Feature: Sound on message (public)

    Hi,

    I've been googling for this, but can't seem to find anything on it. Is it possible to turn the sound on so user gets notified when new message appears on public channels ?

    And/or title change ..so it can be seen on the tab

    Reg

    opened by alekth85 0
  • Grey screen

    Grey screen

    I have tried multiple ways but still cant get off that the grey screen. I am using openfire and candy with apache. I have the rooms configured as well.

    HTTP binding is working on 7070. Below is my exact configuration of the .htaccess and index.html. Please could you tell me what is wrong in this.

    cap2 capture

    opened by adilad 0
  • Error: x-strophe-bad-non-anon-jid

    Error: x-strophe-bad-non-anon-jid

    Hello. I am trying to get Candy working with Openfire, but I get this error x-strophe-bad-non-anon-jid when I try to connect to Candy. I am using the correct username and password. I am using IIS on Windows 10.

    HTML Head

    <link href="osrc/candy-2.2.0/libs.min.css" rel="stylesheet" />
    <link href="osrc/candy-2.2.0/res/default.css" rel="stylesheet" />
    <script src="osrc/candy-2.2.0/libs.min.js"></script>
    <script src="osrc/candy-2.2.0/candy.min.js"></script>
    

    JavaScript

    Candy.init("http://desktop-bn13agh:7070/http-bind/", {
    	core: {
    		// only set this to true if developing / debugging errors
    		debug: true,
    		// autojoin is a *required* parameter if you don't have a plugin (e.g. roomPanel) for it
    		//   true
    		//     -> fetch info from server (NOTE: does only work with openfire server)
    		//   ['[email protected]']
    		//     -> array of rooms to join after connecting
    		autojoin: ["[email protected]"]
    		//autojoin: true
    	},
    	view: {
    		assets: "../res/"
    	}
    });
    Candy.Core.connect("admin", "admin");
    

    Pictures of Setup and Errors

    Candy - Google Chrome Output with Error candy - google chrome output with error IIS - URL Rewrite Rule iis - url rewrite rule Openfire - HTTP Bind Settings openfire - http bind settings Openfire - Client Management openfire - client management Openfire - Group Chat openfire - group chat Openfire - Bookmarks openfire - bookmarks Openfire - Candy Plugin Login Fail openfire - candy plugin login fail

    Please help me to get this working. Let me know what part of my configuration is wrong. Thank you.

    opened by xinthose 1
  • Include Pre-built or

    Include Pre-built or "dist" assets for Package Managers

    Package Managers are mostly used for plug-and-play approach rather installing the package's build environment and building it. For example, I am currently developing on Ruby on Rails where I do just bower install and start including the dist files of packages in my application. In other projects where I do have a build environment, it is usually Webpack or Gulp. In favour of keeping the repository clean, a separate repository can be created for publishing Candy. This approach is used by many of the libraries out there.

    opened by yadwinderpaul 0
  • Fix setting/getting document title when within a crossdomain iframe

    Fix setting/getting document title when within a crossdomain iframe

    Fixes bug introduced in #349 All browsers throw an uncatcheable security error when acessing window.top from a crossdomain iframe.

    opened by mweibel 0
Releases(v2.2.0)
  • v2.0.0(Jul 10, 2015)

  • v1.7.1(Jul 14, 2014)

    Thanks to @benlangfeld, we're pleased to announce a new version of Candy, featuring the following improvements:

    XEP-0048 v1.1 support (bookmarks)

    XEP-0048 specifies a pubsub methodology for setting & getting bookmarks. This allows non-Openfire Candy users to specify autojoin: true in order to join rooms automatically. Also users can bookmark their own rooms using the new bookmark plugin.

    More support for invites

    Invite support is now complete with mediated & direct invites.

    Source code(tar.gz)
    Source code(zip)
  • v1.7.0(Jun 27, 2014)

    This new major release brings various bugfixes and new features which are outlined below. Special thanks go to @melissanoelle, @benlangfeld & @joshuah for their contributions. Also thanks go to people for opening bug reports & helping with testing.

    New features

    XHTML support

    Behind the view flag enableXHTML is a feature which allows Candy to parse & send XHTML annotated messages. There's a new Colors plugin which makes use of this and explains how to enable this feature. (#204)

    XMPP Protocol improvements

    • All XMPP stanzas sent out have now a generated ID with it

    Events

    • before and after event triggered use now the same evtData object in order to be able to modify it from begin to the end of a certain event flow (#215)
    • candy:view.room.before-add, candy:view.private-room.before-open, candy:view.message.before-send and candy:view.message.before-show can now be cancelled within a plugin. Just return false. (#214)
    • New event candy:core:chat:message:other for events received without a type attribute (#236, by @joshuah)
    • New event candy:core.message.chatstate for chat state notifications (typing notifications) (#252 by @melissanoelle)
    • New event candy:core:chat:invite for room invites (#260 by @melissanoelle)

    Bugfixes

    • Role/Affiliation changes should now be correctly reflected in the UI (#233)
    • Prevent errors in some cases where an event returned false (#214)
    • Console.log in debug mode fixed for IE8 (#218)
    • Candy doesn't act on non-room disco replies anymore (#219)

    Other changes

    • The view setting resources has been deprecated. Instead you should use now assets for the path to the CSS etc. files. This has been done to avoid confusion with the core.resource setting which allows you to specify the client's resource name. (#216)
    • Strophe.js and strophejs-plugins have been updated

    Plugins

    In addition to these changes, many contributors created awesome plugins for Candy. Check them out!

    Source code(tar.gz)
    Source code(zip)
  • v1.6.0(Jan 20, 2014)

    This new major release brings various bugfixes and new features, tested with 3 betas in the last 2 weeks. It's a combined effort of a lot of Candy users and contributors. Thank you all.

    Please note that are some new translation strings. English and German are always up to date but there are untranslated strings in other languages. Please submit pull requests in order to add them. In the future, we think about improving this process (as part of #207).

    When upgrading please make sure that you upgrade all the plugins as well.

    New features

    Nickname change support

    • Changing nicknames is now possible, as well as receiving nickname changes (#2)
    • Using the nickchange plugin, you can enable your users with a friendly toolbar icon to change their nicknames
    • Server-side nick assignments are now also possible, thanks to @PaulSD (#208)

    Websocket support

    • With the upgrade to Strophe version 1.1.1, it's possible to connect to a websocket endpoint
    • In order to use websockets, just supply a ws:// or wss:// URL as the first parameter of Candy.init()

    Bugfixes & Tweaks

    Escaping

    Throughout Candy it should be now possible to use rooms and nicknames with non-ASCII chars.

    Other

    • Support specifying resource as a config param (#209 / #199, thanks @PaulSD)
    • New event candy:view.connection.status-<STROPHE-STATUS> is triggered when strophe status changes happen. This enables users to e.g. reload the page when a disconnection happens (#202, thanks @lkraav)
    • Update example with more helpful hints (fixes #203 & #211, thanks @lkraav & @michael-dev)
    • Fix nickname conflict label
    • Support jQuery >= 1.9
    • Display error message if autojoin config param is empty
    • Add ARIA label to text field (fixes #182, thanks @jrbl)
    • Linkify subject by default (fixes #196)
    • New Brazilian portuguese translation (fixes #143, thanks @renato)
    • Fix privacy list error dection for Prosody (fixes #200)
    • New event trigger before connecting which enables Plugins to reliably create stanza handlers
    • Remove deprecated event system
    • New CONTRIBUTING.md file to help new contributors
    • Add sourcemap support for candy.bundle.js
    • Fix Candy.Core.log to be able to display the original line number instead of the line number of the log function

    Various

    Build tool change

    We replaced the existing build tool with Grunt. This should make contributing much easier (especially also for windows users). In order to contribute to Candy, please read CONTRIBUTING.md. If you're already familiar with grunt, these are the commands available:

    • grunt watch watches the filesystem for changes, runs jshint on the changed files and if no errors are there, runs concat and uglify to build candy.bundle.js and candy.min.js.
    • grunt jshint runs jshint with our defined rules
    • grunt concat concats source files and library files to candy.bundle.js and libs.bundle.js
    • grunt uglify minifies bundles to candy.min.js and libs.min.js
    • grunt docs regenerates documentation

    All grunt tasks should notify you (if supported by the OS you're on) if the task is finished.

    As usual, if you discover bugs, open an issue and if you have questions, ask in our mailinglist (no gmail address required to subscribe).

    Source code(tar.gz)
    Source code(zip)
  • v1.6.0-beta3(Jan 17, 2014)

    Beta 3 fixes:

    • Fix #202 by triggering a new event (example in the example for the event trigger) [thanks @lkraav]
    • Update example with helpful hints
    • Fix nickname conflict label (nickname instead of username)
    Source code(tar.gz)
    Source code(zip)
  • v1.6.0-beta2(Jan 13, 2014)

  • v1.6.0-beta1(Jan 10, 2014)

    Due to the amount of changes we decided to create a beta first. Please help us test.

    Escaping

    Using nicknames and rooms with non-ASCII characters has not been possible until now due to some wrong implementations on our side. With this beta release, various fixes have landed to address these issues.

    Nickname change support

    • Candy is now finally able to rename a user which sends a nickname change to rooms you're in.
    • New API method: Candy.Core.Action.Jabber.SetNickname(nickname) to change a user's nickname (e.g. by plugins).

    Websocket support

    Build tool change

    We replaced the existing build tool with Grunt. This should make contributing much easier (especially also for windows users). In order to contribute to Candy, please read CONTRIBUTING.md. If you're already familiar with grunt, these are the commands available:

    • grunt watch watches the filesystem for changes, runs jshint on the changed files and if no errors are there, runs concat and uglify to build candy.bundle.js and candy.min.js.
    • grunt jshint runs jshint with our defined rules
    • grunt concat concats source files and library files to candy.bundle.js and libs.bundle.js
    • grunt uglify minifies bundles to candy.min.js and libs.min.js
    • grunt docs regenerates documentation

    All grunt tasks should notify you (if supported by the OS you're on) if the task is finished.

    Various features and fixes

    Other fixes and new features include:

    • Support jQuery >= 1.9 (we still have a IE version check though)
    • Display error message if autojoin config param is empty
    • Add ARIA label to text field (fixes #182, thanks @jrbl)
    • Linkify subject by default (fixes #196)
    • New Brazilian portuguese translation (fixes #143, thanks @renato)
    • Fix privacy list error detection for Prosody (fixes #200)
    • New event trigger before connecting which enables Plugins to reliably create stanza handlers
    • Update example (fixes #203, thanks @lkraav)
    • Remove deprecated event system

    Thanks a lot to all the contributors, we appreciate this!

    As usual, if you discover bugs, open an issue and if you have questions, ask in our mailinglist (no gmail address required to subscribe).

    Source code(tar.gz)
    Source code(zip)
  • v1.5.0(Dec 14, 2013)

    New event system

    We now use jQuery events instead of our own observer functionality for building plugins. This enables plugin developers to build more awesome plugins and also removes the issue that one plugin could overwrite the hooks of another plugin.

    New default theme

    We built a new default theme for Candy. The new design brings some eye-candy and looks more polished.

    Bugfixes

    We fixed a lot of bugs and improved the core to be more robust.

    Source code(tar.gz)
    Source code(zip)
Owner
Candy Chat
A multi-user chat client for XMPP entirely written in JavaScript.
Candy Chat
JavaScript-based multi-user chat client for XMPP.

Note: This project is dead and not maintained anymore. Candy — a JavaScript-based multi-user chat client Visit the official project page: http://candy

Candy Chat 1.3k Jun 6, 2021
Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)

ejabberd Community Edition ejabberd is a distributed, fault-tolerant technology that allows the creation of large-scale instant messaging applications

ProcessOne 4.9k Jun 6, 2021
An XMPP server licensed under the Open Source Apache License.

Openfire About Openfire is a real time collaboration (RTC) server licensed under the Open Source Apache License. It uses the only widely adopted open

Ignite Realtime 2.3k Jun 6, 2021
MongooseIM is a mobile messaging platform with focus on performance and scalability

MongooseIM platform Getting started Developer's guide Packages Product page: https://www.erlang-solutions.com/products/mongooseim.html Documentation:

Erlang Solutions 1.4k Jun 1, 2021
Metronome IM, lightweight xmpp server with advanced microblogging features.

This software codebase began as a fork of prosody trunk (to be 0.9) merged with LW.Org's custom patches, initiating from August 7th 2012 (see first co

Marco Cirillo 144 May 24, 2021