ConverseJS is the most advanced and fastest chatroom module for Drupal.

I have written fully detailed information on the project page and in README.txt and QUICKSTART.txt and TROUBLESHOOTING.txt files.

Quick Demo

This is "Quick demo" and does not show all features of this module.
http://conversejs.hejazee.ir/

About

This module is a fully featured bridge between drupal and converse.js library, an advanced XMPP (Jabber) chat client for your website.

Converse.js is an open source webchat client, that runs in the browser and can be integrated into any website.
It's similar to Facebook chat, but also supports multi-user chatrooms.
Converse.js can connect to any accessible XMPP/Jabber server, either from a public provider such as jabber.org, or to one you have set up yourself.

It's possible to enable single-site-login, whereby users already authenticated in your website will also be automatically logged in on the chat server, but you will have to pre-authenticate them on your server.

Features

For detailed information and full features list of this module, please make sure you have read all information in project page.
I won't duplicate all of them here.

Installation and usage

Since this module depends on multiple third-party softwares, installation of it can be a little (or very) complex.
I have written a QUICKSTART guide.

Coding standards

I'm very strict about coding standards and best practices.
You can find my module's code review here:
http://pareview.sh/pareview/httpgitdrupalorgsandboxhejazee2225689git-7x-1x

There is a few Errors shown in this log, but they are not critical and you should not care.

  • Variables not defined: These warnings are due to the module design, and are not important. This module needs some setup before being used in some scenarios. see docs for more details.
  • camel caps format errors: These are because this module uses third-party PHP libraries.

Comparison with other modules

DrupalChat is a chat module but does not use XMPP. conversejs is much faster and better. Just look at its feature list.
Currently I can't find any other XMPP chat module for Drupal.

Project Page

https://drupal.org/sandbox/hejazee/2225689

Git clone

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/hejazee/2225689.git conversejs

Reviews of other projects

Comments

hejazee’s picture

Issue summary: View changes
PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

hejazee’s picture

Issue summary: View changes
hejazee’s picture

Title: [D7] Converse.js Integration (Chatroom) » [D7] Converse.js Integration (Most advanced chatroom for Drupal)
nicorac’s picture

Status: Needs review » Needs work

Just a quick fix needed to satisfy Drupal coding standards: function conversejs_prebind() defines 2 variables with a camelCase formatted name.
$sessionInfo --> $session_info
$xmppPrebind --> $xmpp_prebind

A suggestion to help translation: keep all the HTMLS tags and untranslatable text out of t() calls.
conversejs.admin.inc (302):

'#description' => t('Allow <a href="https://otr.cypherpunks.ca/">OTR (Off-the-record encryption)</a>'),

should read

'#description' => t('Allow !link', array('!link' => l(t('OTR (Off-the-record encryption)'), 'https://otr.cypherpunks.ca/'))),

This way:

  • translators are not needed to know your code
  • they cannot garble HTML tags
  • changes to the URL does not require an translation update

Best wishes for your module.

hejazee’s picture

fixed.
Thanks a lot.

hejazee’s picture

Status: Needs work » Needs review

Change issue status. sorry.

hejazee’s picture

Issue summary: View changes

Added a demo site.

dbcollies’s picture

Status: Needs review » Reviewed & tested by the community

I have reviewed the code, and feel that it falls within guidelines.

Coding Standards

I agree that the style variations reported are acceptable within this context.

Manual code review

I found some issues, but nothing warranting returning to "needs work"

  • conversejs.admin.inc
    • I'd prefer to see the markup removed from the t() calls. You modified the specific one mentioned in comment #5, but there are several other instances of <a>, <strong>, <code>, <p> and <br>
    • The word 'Advanced' is misspelled at one point as 'Advaned'
  • conversejs.install
    • Your method of clearing out the variables makes me nervous. I think I'd rather see an explicit clearing of variables by name, but that may be me being extra paranoid
  • conversejs.module
    • The use of php_eval had me worried, but it looks like you've got that covered in a pretty explicit permission, so I'm OK with it
    • Even though all of the settings will be managed by an administrator, I'd still prefer to see the conversejs_get_params() function do a filter_xss() on the values, where appropriate.
hejazee’s picture

Issue summary: View changes
kscheirer’s picture

Assigned: Unassigned » klausi
Issue tags: +PAreview: security

Non-blocking issues:

  • You can remove .gitignore
  • It's highly unlikely that anything will go wrong in conversejs_uninstall(), but Drupal prefers calling variable_del() on each variable individually
  • Because you are dependent on several libraries, consider using the Libraries API. This helps prevent a library from being included multiple times and makes it easier for the admin to know that everything is installed properly. Also consider a hook_requirements() in your install file to check that all libraries are loaded correctly when the module execute.
  • In conversejs_tokens() Drupal's coding standards use && and || instead of and/or

Assigning to klausi for security check as noted in #9, and additionally for the user passwordhash token. Otherwise no issues found from me!

klausi’s picture

Assigned: klausi » Unassigned
Issue tags: -PAreview: security

The execution of php_eval() should be wrapped with a module_exists('php_filter') condition, but since the admin config access is protected with a PHP permission this is not a security issue on its own.

The settings are passed to drupal_add_js() which will do proper escaping, so I see no XSS vulnerability there. Depends how the library then handles the conf strings, but I see no apparent vulnerability there either.

hejazee’s picture

Issue summary: View changes

Thanks to all the guys who reviewed my project.

The demonstration is live again: http://conversejs.hejazee.ir/
But with very limited features.
You should install it yourself to see all features and settings.

This demo is only there to show that this module is fully working and you can see how converse.js looks and how the users can interact with it.

I'm waiting for this project application to be approved.
I've posted this application about 10 months ago!

When I gain access to full projects, I will continue the development of this module. (there are many great new features I can add, but I'm waiting for the project application.)

because every new feature I add now, will prolong the review process :(

Please accept this project ASAP :)

Thanks again.

kscheirer’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the review klausi! Since no other issues were found...

Thanks for your contribution, hejazee!

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

nicorac’s picture

Welcome aboard, and good luck.

hejazee’s picture

First of all I would like to say thank you to JC Brand, who created the great converse.js project and kindly shared it with the community.

Thanks everybody who helped this project, either by reviewing this project application or by testing it and reporting issues (on the issue queue).

I would like to say special thanks to @kscheirer who approved this application.

Thanks to all the guys who make Drupal such a great project.

Best regards.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.