Commit d69a165b authored by JC Brand's avatar JC Brand

Use strict mode. Emit an event when the connection drops.

parent 64408d2e
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
* Copyright (c) 2012, Jan-Carel Brand <jc@opkode.com> * Copyright (c) 2012, Jan-Carel Brand <jc@opkode.com>
* Dual licensed under the MIT and GPL Licenses * Dual licensed under the MIT and GPL Licenses
*/ */
"use strict";
// AMD/global registrations // AMD/global registrations
(function (root, factory) { (function (root, factory) {
...@@ -340,6 +341,7 @@ ...@@ -340,6 +341,7 @@
this.reconnect = function () { this.reconnect = function () {
converse.giveFeedback(__('Reconnecting'), 'error'); converse.giveFeedback(__('Reconnecting'), 'error');
converse.emit('onReconnect');
if (!converse.prebind) { if (!converse.prebind) {
this.connection.connect( this.connection.connect(
this.connection.jid, this.connection.jid,
...@@ -3219,6 +3221,7 @@ ...@@ -3219,6 +3221,7 @@
}, },
getPrettyStatus: function (stat) { getPrettyStatus: function (stat) {
var pretty_status;
if (stat === 'chat') { if (stat === 'chat') {
pretty_status = __('online'); pretty_status = __('online');
} else if (stat === 'dnd') { } else if (stat === 'dnd') {
......
...@@ -4,16 +4,17 @@ Changelog ...@@ -4,16 +4,17 @@ Changelog
0.8 (Unreleased) 0.8 (Unreleased)
---------------- ----------------
.. note:: Converse.js is now relicensed under the `Mozilla Public License http://www.mozilla.org/MPL/2.0/`_.
* Chat boxes and rooms can now be resized vertically. [jcbrand] * Chat boxes and rooms can now be resized vertically. [jcbrand]
* Upgraded many dependencies to their latest versions. [jcbrand] * Upgraded many dependencies to their latest versions. [jcbrand]
* Add new configuration setting `forward_messages <https://conversejs.org/docs/html/index.html#forward_messages>`_ * Add new configuration setting `forward_messages <https://conversejs.org/docs/html/index.html#forward_messages>`_
Message forwarding was before default behavior but is now optional (and disabled by default). Message forwarding was before default behavior but is now optional (and disabled by default). [jcbrand]
[jcbrand] * Newly opened chat boxes always appear immediately left of the controlbox.
* #71 Chat boxes and rooms can be minimized. [jcbrand] * #71 Chat boxes and rooms can be minimized. [jcbrand]
* #130 Fixed bootstrap conflicts. [jcbrand] * #130 Fixed bootstrap conflicts. [jcbrand]
* #132 Support for `XEP-0280: Message Carbons <https://xmpp.org/extensions/xep-0280.html'>`_. * #132 Support for `XEP-0280: Message Carbons <https://xmpp.org/extensions/xep-0280.html'>`_.
Configured via `enable_message_carbons <https://conversejs.org/docs/html/index.html#enable_message_carbons>`_ Configured via `enable_message_carbons <https://conversejs.org/docs/html/index.html#enable_message_carbons>`_ [hejazee]
[hejazee]
0.7.4 (2014-03-05) 0.7.4 (2014-03-05)
------------------ ------------------
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment