Commit d4d3d4c8 authored by JC Brand's avatar JC Brand

Merge branch 'split-muc' into bootstrap4

parents 877b5ca0 0013ee55
......@@ -19,13 +19,26 @@ with regards to sponsoring development on reintroducing them.
* Removed the `xhr_user_search` and `xhr_user_search_url` configuration options.
## 3.3.4 (Unreleased)
## 3.3.4 (2018-03-05)
- Avoid `eval` (via `_.template` from lodash).
- Bugfix. Avatars weren't being shown.
- Bugfix. Bookmarks list and open rooms list weren't recreated after logging in for a 2nd time (without reloading the browser).
- Don't show bookmark toggles when PEP bookmarking not supported by the XMPP server.
- Add LibreJS support
- Emojis are now sent in unicode instead of short names (also in MUCs)
### Bugfixes
- Server field in `Rooms` tab showed MUC supporting clients instead of only components.
- Avatars weren't being shown.
- Bookmarks list and open rooms list weren't recreated after logging in for a 2nd time (without reloading the browser).
- #1022 Status message not sent out on subsequent presences
- #1024 null reference on MUC Invite
- #1025 OTR lock icon disappears
- #1027 `new Event` not supported in IE11
- #1028 Avoid `eval` (crept in via `_.template` from lodash).
### Translation changes
- New locale: Bulgarian
- Updated German, Russian, Chinese (traditional), Norwegian Bokmål and French translations.
## 3.3.3 (2018-02-14)
......
......@@ -2,7 +2,7 @@
*
* An XMPP chat client that runs in the browser.
*
* Version: 3.3.3
* Version: 3.3.4
*
* Copyright: JC Brand 2012-2017
* Except for 3rd party dependencies.
......
......@@ -72,7 +72,7 @@ serve_bg: dev
########################################################################
## Translation machinery
GETTEXT = xgettext --language="JavaScript" --keyword=__ --keyword=___ --from-code=UTF-8 --output=locale/converse.pot dist/converse-no-dependencies.js --package-name=Converse.js --copyright-holder="Jan-Carel Brand" --package-version=3.3.3 -c
GETTEXT = xgettext --language="JavaScript" --keyword=__ --keyword=___ --from-code=UTF-8 --output=locale/converse.pot dist/converse-no-dependencies.js --package-name=Converse.js --copyright-holder="Jan-Carel Brand" --package-version=3.3.4 -c
.PHONY: pot
pot: dist/converse-no-dependencies.js
......
......@@ -149,8 +149,8 @@
#converse-embedded-chat .icon-legal:before,
#conversejs .icon-legal:before {
content: "\f0e3"; }
#converse-embedded-chat .icon-lock-2:before,
#conversejs .icon-lock-2:before {
#converse-embedded-chat .icon-lock:before,
#conversejs .icon-lock:before {
content: "\e027"; }
#converse-embedded-chat .icon-minus:before,
#conversejs .icon-minus:before {
......
......@@ -142,8 +142,8 @@
#converse-embedded-chat .icon-legal:before,
#conversejs .icon-legal:before {
content: "\f0e3"; }
#converse-embedded-chat .icon-lock-2:before,
#conversejs .icon-lock-2:before {
#converse-embedded-chat .icon-lock:before,
#conversejs .icon-lock:before {
content: "\e027"; }
#converse-embedded-chat .icon-minus:before,
#conversejs .icon-minus:before {
......
......@@ -149,8 +149,8 @@
#converse-embedded-chat .icon-legal:before,
#conversejs .icon-legal:before {
content: "\f0e3"; }
#converse-embedded-chat .icon-lock-2:before,
#conversejs .icon-lock-2:before {
#converse-embedded-chat .icon-lock:before,
#conversejs .icon-lock:before {
content: "\e027"; }
#converse-embedded-chat .icon-minus:before,
#conversejs .icon-minus:before {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -48,9 +48,9 @@ copyright = u'2017, JC Brand'
# built documents.
#
# The short X.Y version.
version = '3.3.3'
version = '3.3.4'
# The full version, including alpha/beta/rc tags.
release = '3.3.3'
release = '3.3.4'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
......@@ -22,8 +22,8 @@ The latest versions of these files are available at these URLs:
To load a specific version of Converse.js you can put the version in the URL, like so:
* https://cdn.conversejs.org/3.3.3/dist/converse.min.js
* https://cdn.conversejs.org/3.3.3/css/converse.min.css
* https://cdn.conversejs.org/3.3.4/dist/converse.min.js
* https://cdn.conversejs.org/3.3.4/css/converse.min.css
You can include these two URLs inside the *<head>* element of your website
via the *script* and *link* tags:
......
......@@ -58,9 +58,6 @@
<li>
<a href="/docs/html/index.html">Documentation</a>
</li>
<li>
<a href="jslicenses.html" rel="jslicense">Licences</a>
</li>
<li>
<a href="https://github.com/jcbrand/converse.js/releases" class="button" target="_blank" rel="noopener">Download</a>
</li>
......
......@@ -7,8 +7,8 @@
<link rel="shortcut icon" type="image/ico" href="css/images/favicon.ico"/>
<script type="text/javascript" src="inverse-analytics.js"></script>
<noscript><p><img src="//stats.opkode.com/piwik.php?idsite=5" style="border:0;" alt="" /></p></noscript>
<link type="text/css" rel="stylesheet" media="screen" href="https://cdn.conversejs.org/3.3.1/css/inverse.min.css" />
<script src="https://cdn.conversejs.org/3.3.1/dist/converse.min.js"></script>
<link type="text/css" rel="stylesheet" media="screen" href="https://cdn.conversejs.org/css/inverse.min.css" />
<script src="/cdn.conversejs.org/dist/converse.min.js"></script>
</head>
<body>
<div class="content">
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{
"name": "converse.js",
"version": "3.3.3",
"version": "3.3.4",
"description": "Browser based XMPP instant messaging client",
"main": "main.js",
"directories": {
......@@ -77,5 +77,7 @@
"wait-until-promise": "^1.0.0",
"xss": "^0.3.3"
},
"dependencies": {}
"dependencies": {
"npm": "^5.7.1"
}
}
......@@ -68,7 +68,7 @@
.icon-italic:before { content: "\e04f"; }
.icon-key:before { content: "\e028"; }
.icon-legal:before { content: "\f0e3"; }
.icon-lock-2:before { content: "\e027"; }
.icon-lock:before { content: "\e027"; }
.icon-minus:before { content: "\e05a"; }
.icon-music:before { content: "\266b"; }
.icon-newtab:before { content: "\e053"; }
......
......@@ -1423,16 +1423,15 @@
var from_jid = name.replace(/ /g,'.').toLowerCase() + '@localhost';
var room_jid = 'lounge@localhost';
var reason = "Please join this chat room";
var message = $(
"<message from='"+from_jid+"' to='"+_converse.bare_jid+"'>" +
"<x xmlns='jabber:x:conference'" +
"jid='"+room_jid+"'" +
"reason='"+reason+"'/>"+
"</message>"
)[0];
expect(_converse.chatboxes.models.length).toBe(1);
expect(_converse.chatboxes.models[0].id).toBe("controlbox");
_converse.onDirectMUCInvitation(message);
var stanza = Strophe.xmlHtmlNode(
'<message xmlns="jabber:client" to="'+_converse.bare_jid+'" from="'+from_jid+'" id="9bceb415-f34b-4fa4-80d5-c0d076a24231">'+
'<x xmlns="jabber:x:conference" jid="'+room_jid+'" reason="'+reason+'"/>'+
'</message>').firstChild;
_converse.onDirectMUCInvitation(stanza);
expect(window.confirm).toHaveBeenCalledWith(
name + ' has invited you to join a chat room: '+ room_jid +
', and left the following reason: "'+reason+'"');
......@@ -3142,26 +3141,41 @@
null, ['rosterGroupsFetched'], {},
function (done, _converse) {
var sendIQ = _converse.connection.sendIQ;
var sent_stanza, IQ_id;
spyOn(_converse.connection, 'sendIQ').and.callFake(function (iq, callback, errback) {
sent_stanza = iq;
IQ_id = sendIQ.bind(this)(iq, callback, errback);
});
test_utils.openControlBox();
var panel = _converse.chatboxviews.get('controlbox').roomspanel;
$(panel.tabs).find('li').last().find('a')[0].click(); // Click the chatrooms tab
panel.model.set({'muc_domain': 'muc.localhost'}); // Make sure the domain is set
// See: http://xmpp.org/extensions/xep-0045.html#disco-rooms
expect($('#available-chatrooms').children('dt').length).toBe(0);
expect($('#available-chatrooms').children('dd').length).toBe(0);
expect(document.querySelectorAll('#available-chatrooms dt').length).toBe(0);
expect(document.querySelectorAll('#available-chatrooms dd').length).toBe(0);
document.querySelector('input#show-rooms').click();
expect(sent_stanza.toLocaleString()).toBe(
"<iq to='muc.localhost' from='dummy@localhost/resource' type='get' xmlns='jabber:client' id='"+IQ_id+"'>"+
"<query xmlns='http://jabber.org/protocol/disco#items'/>"+
"</iq>"
);
var iq = $iq({
from:'muc.localhost',
to:'dummy@localhost/pda',
id: IQ_id,
type:'result'
}).c('query')
.c('item', { jid:'heath@chat.shakespeare.lit', name:'A Lonely Heath'}).up()
.c('item', { jid:'coven@chat.shakespeare.lit', name:'A Dark Cave'}).up()
.c('item', { jid:'forres@chat.shakespeare.lit', name:'The Palace'}).up()
.c('item', { jid:'inverness@chat.shakespeare.lit', name:'Macbeth&apos;s Castle'}).nodeTree;
_converse.connection._dataRecv(test_utils.createRequest(iq));
panel.onRoomsFound(iq);
expect($(panel.el.querySelector('#available-chatrooms')).children('dt').length).toBe(1);
expect(document.querySelectorAll('#available-chatrooms dt').length).toBe(1);
expect($(panel.el.querySelector('#available-chatrooms')).children('dt').first().text()).toBe("Rooms found");
expect($(panel.el.querySelector('#available-chatrooms')).children('dd').length).toBe(4);
done();
......
This diff is collapsed.
......@@ -539,8 +539,8 @@
_converse.api.disco.supports(Strophe.NS.PUBSUB+'#publish-options', _converse.bare_jid)
]).then((args) => {
resolve(args[0] && (args[1].supported || _converse.allow_public_bookmarks));
});
});
}).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
}).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
}
const initBookmarks = function () {
......
......@@ -249,6 +249,7 @@
render () {
this.el.innerHTML = tpl_chatbox_head(
_.extend(this.model.toJSON(), {
'_converse': _converse,
'avatar_width': _converse.chatview_avatar_width,
'avatar_height': _converse.chatview_avatar_height,
'info_close': __('Close this chat box'),
......
This diff is collapsed.
This diff is collapsed.
......@@ -21,7 +21,7 @@
converse.plugins.add('converse-fullscreen', {
enabled (_converse) {
return _.includes(['mobile', 'fullscreen', 'embedded'], _converse.view_mode);
return _.includes(['fullscreen', 'embedded'], _converse.view_mode);
},
overrides: {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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