瀏覽代碼

Release 3.3.2

JC Brand 7 年之前
父節點
當前提交
6b644d6d11

+ 1 - 1
CHANGES.md

@@ -1,6 +1,6 @@
 # Changelog
 # Changelog
 
 
-## 3.3.2 (Unreleased)
+## 3.3.2 (2018-01-29)
 
 
 ### Bugfixes
 ### Bugfixes
 
 

+ 1 - 1
COPYRIGHT

@@ -2,7 +2,7 @@
  *
  *
  *  An XMPP chat client that runs in the browser.
  *  An XMPP chat client that runs in the browser.
  *
  *
- *  Version: 3.3.1
+ *  Version: 3.3.2
  *
  *
  *  Copyright: JC Brand 2012-2017
  *  Copyright: JC Brand 2012-2017
  *  Except for 3rd party dependencies.
  *  Except for 3rd party dependencies.

+ 1 - 1
Makefile

@@ -71,7 +71,7 @@ serve_bg: dev
 ########################################################################
 ########################################################################
 ## Translation machinery
 ## 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.1 -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.2 -c
 
 
 .PHONY: pot
 .PHONY: pot
 pot: dist/converse-no-dependencies.js
 pot: dist/converse-no-dependencies.js

文件差異過大導致無法顯示
+ 300 - 295
dist/converse-no-dependencies.js


+ 27 - 21
dist/converse.js

@@ -2,7 +2,7 @@
  *
  *
  *  An XMPP chat client that runs in the browser.
  *  An XMPP chat client that runs in the browser.
  *
  *
- *  Version: 3.3.1
+ *  Version: 3.3.2
  */
  */
 
 
 /* jshint ignore:start */
 /* jshint ignore:start */
@@ -34805,7 +34805,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
 
 
   var b64_sha1 = Strophe.SHA1.b64_sha1;
   var b64_sha1 = Strophe.SHA1.b64_sha1;
   Strophe = Strophe.Strophe;
   Strophe = Strophe.Strophe;
-  var URL_REGEX = /\b(https?:\/\/|www\.|https?:\/\/www\.)[^\s<>]{2,200}\b/g;
+  var URL_REGEX = /\b(https?:\/\/|www\.|https?:\/\/www\.)[^\s<>]{2,200}\b\/?/g;
 
 
   var logger = _.assign({
   var logger = _.assign({
     'debug': _.get(console, 'log') ? console.log.bind(console) : _.noop,
     'debug': _.get(console, 'log') ? console.log.bind(console) : _.noop,
@@ -35173,6 +35173,10 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
     return _.filter(jid.split('@')).length === 2 && !jid.startsWith('@') && !jid.endsWith('@');
     return _.filter(jid.split('@')).length === 2 && !jid.startsWith('@') && !jid.endsWith('@');
   };
   };
 
 
+  u.isValidMUCJID = function (jid) {
+    return !jid.startsWith('@') && !jid.endsWith('@');
+  };
+
   u.isSameBareJID = function (jid1, jid2) {
   u.isSameBareJID = function (jid1, jid2) {
     return Strophe.getBareJidFromJid(jid1).toLowerCase() === Strophe.getBareJidFromJid(jid2).toLowerCase();
     return Strophe.getBareJidFromJid(jid1).toLowerCase() === Strophe.getBareJidFromJid(jid2).toLowerCase();
   };
   };
@@ -35199,13 +35203,19 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
     return text && !!text.match(/^\?OTR/);
     return text && !!text.match(/^\?OTR/);
   };
   };
 
 
-  u.isHeadlineMessage = function (message) {
+  u.isHeadlineMessage = function (_converse, message) {
     var from_jid = message.getAttribute('from');
     var from_jid = message.getAttribute('from');
 
 
     if (message.getAttribute('type') === 'headline') {
     if (message.getAttribute('type') === 'headline') {
       return true;
       return true;
     }
     }
 
 
+    var chatbox = _converse.chatboxes.get(Strophe.getBareJidFromJid(from_jid));
+
+    if (chatbox && chatbox.get('type') === 'chatroom') {
+      return false;
+    }
+
     if (message.getAttribute('type') !== 'error' && !_.isNil(from_jid) && !_.includes(from_jid, '@')) {
     if (message.getAttribute('type') !== 'error' && !_.isNil(from_jid) && !_.includes(from_jid, '@')) {
       // Some servers (I'm looking at you Prosody) don't set the message
       // Some servers (I'm looking at you Prosody) don't set the message
       // type to "headline" when sending server messages. For now we
       // type to "headline" when sending server messages. For now we
@@ -40561,7 +40571,7 @@ return Backbone.BrowserStorage;
             _converse.log("onMessage: Ignoring incoming message intended for a different resource: ".concat(to_jid), Strophe.LogLevel.INFO);
             _converse.log("onMessage: Ignoring incoming message intended for a different resource: ".concat(to_jid), Strophe.LogLevel.INFO);
 
 
             return true;
             return true;
-          } else if (utils.isHeadlineMessage(message)) {
+          } else if (utils.isHeadlineMessage(_converse, message)) {
             // XXX: Ideally we wouldn't have to check for headline
             // XXX: Ideally we wouldn't have to check for headline
             // messages, but Prosody sends headline messages with the
             // messages, but Prosody sends headline messages with the
             // wrong type ('chat'), so we need to filter them out here.
             // wrong type ('chat'), so we need to filter them out here.
@@ -44322,8 +44332,11 @@ return __p
         },
         },
         renderEmojiPicker: function renderEmojiPicker() {
         renderEmojiPicker: function renderEmojiPicker() {
           var toggle = this.el.querySelector('.toggle-smiley');
           var toggle = this.el.querySelector('.toggle-smiley');
-          toggle.innerHTML = '';
-          toggle.appendChild(this.emoji_picker_view.render().el);
+
+          if (!_.isNull(toggle)) {
+            toggle.innerHTML = '';
+            toggle.appendChild(this.emoji_picker_view.render().el);
+          }
         },
         },
         focus: function focus() {
         focus: function focus() {
           var textarea_el = this.el.querySelector('.chat-textarea');
           var textarea_el = this.el.querySelector('.chat-textarea');
@@ -51552,8 +51565,8 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
       _converse.api.promises.add(['roomsPanelRendered', 'roomsAutoJoined']);
       _converse.api.promises.add(['roomsPanelRendered', 'roomsAutoJoined']);
 
 
       function openRoom(jid) {
       function openRoom(jid) {
-        if (!u.isValidJID(jid)) {
-          return converse.log("Invalid JID \"".concat(jid, "\" provided in URL fragment"), Strophe.LogLevel.WARN);
+        if (!u.isValidMUCJID(jid)) {
+          return _converse.log("Invalid JID \"".concat(jid, "\" provided in URL fragment"), Strophe.LogLevel.WARN);
         }
         }
 
 
         var promises = [_converse.api.waitUntil('roomsAutoJoined')];
         var promises = [_converse.api.waitUntil('roomsAutoJoined')];
@@ -51667,7 +51680,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
           'click .new-msgs-indicator': 'viewUnreadMessages',
           'click .new-msgs-indicator': 'viewUnreadMessages',
           'click .occupant': 'onOccupantClicked',
           'click .occupant': 'onOccupantClicked',
           'keypress .chat-textarea': 'keyPressed',
           'keypress .chat-textarea': 'keyPressed',
-          'click .send-button': 'onSendButtonClicked'
+          'click .send-button': 'onFormSubmitted'
         },
         },
         initialize: function initialize() {
         initialize: function initialize() {
           var _this = this;
           var _this = this;
@@ -52479,9 +52492,8 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
           }
           }
 
 
           var room = this.model.get('jid');
           var room = this.model.get('jid');
-          var node = Strophe.getNodeFromJid(room);
-          var domain = Strophe.getDomainFromJid(room);
-          return node + "@" + domain + (nick !== null ? "/".concat(nick) : "");
+          var jid = Strophe.getBareJidFromJid(room);
+          return jid + (nick !== null ? "/".concat(nick) : "");
         },
         },
         registerHandlers: function registerHandlers() {
         registerHandlers: function registerHandlers() {
           /* Register presence and message handlers for this chat
           /* Register presence and message handlers for this chat
@@ -53996,12 +54008,6 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
           this.removeSpinner();
           this.removeSpinner();
         },
         },
         roomStanzaItemToHTMLElement: function roomStanzaItemToHTMLElement(room) {
         roomStanzaItemToHTMLElement: function roomStanzaItemToHTMLElement(room) {
-          if (!u.isValidJID(room.getAttribute('jid'), '@')) {
-            // Some XMPP servers return the MUC service in
-            // the list of rooms (see #1003).
-            return null;
-          }
-
           var name = Strophe.unescapeNode(room.getAttribute('name') || room.getAttribute('jid'));
           var name = Strophe.unescapeNode(room.getAttribute('name') || room.getAttribute('jid'));
           var div = document.createElement('div');
           var div = document.createElement('div');
           div.innerHTML = tpl_room_item({
           div.innerHTML = tpl_room_item({
@@ -54166,7 +54172,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
 
 
           return {
           return {
             'jid': jid,
             'jid': jid,
-            'name': name || Strophe.unescapeNode(Strophe.getNodeFromJid(jid))
+            'name': name || Strophe.unescapeNode(Strophe.getNodeFromJid(jid)) || jid
           };
           };
         },
         },
         openChatRoom: function openChatRoom(ev) {
         openChatRoom: function openChatRoom(ev) {
@@ -64968,7 +64974,7 @@ return __p
           return false;
           return false;
         } else if (message.getAttribute('type') === 'groupchat') {
         } else if (message.getAttribute('type') === 'groupchat') {
           return _converse.shouldNotifyOfGroupMessage(message);
           return _converse.shouldNotifyOfGroupMessage(message);
-        } else if (utils.isHeadlineMessage(message)) {
+        } else if (utils.isHeadlineMessage(_converse, message)) {
           // We want to show notifications for headline messages.
           // We want to show notifications for headline messages.
           return _converse.isMessageToHiddenChat(message);
           return _converse.isMessageToHiddenChat(message);
         }
         }
@@ -66307,7 +66313,7 @@ return __p
         /* Handler method for all incoming messages of type "headline". */
         /* Handler method for all incoming messages of type "headline". */
         var from_jid = message.getAttribute('from');
         var from_jid = message.getAttribute('from');
 
 
-        if (utils.isHeadlineMessage(message)) {
+        if (utils.isHeadlineMessage(_converse, message)) {
           if (_.includes(from_jid, '@') && !_converse.allow_non_roster_messaging) {
           if (_.includes(from_jid, '@') && !_converse.allow_non_roster_messaging) {
             return;
             return;
           }
           }

+ 2 - 2
docs/source/conf.py

@@ -48,9 +48,9 @@ copyright = u'2017, JC Brand'
 # built documents.
 # built documents.
 #
 #
 # The short X.Y version.
 # The short X.Y version.
-version = '3.3.1'
+version = '3.3.2'
 # The full version, including alpha/beta/rc tags.
 # The full version, including alpha/beta/rc tags.
-release = '3.3.1'
+release = '3.3.2'
 
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
 # for a list of supported languages.

+ 1 - 1
index.html

@@ -238,7 +238,7 @@
                         </ul>
                         </ul>
                     </div>
                     </div>
 
 
-                    <p class="sponsors-text">Converse.js is a software commons; available at no cost to you and every other person on earth.
+                    <p class="sponsors-text">Converse.js is a software commons; available at no cost to you or anyone else.
                        Sponsorships allow us to fund further development and improvements and are greatly appreciated.
                        Sponsorships allow us to fund further development and improvements and are greatly appreciated.
                        If you'd like to sponsor this project, please visit <a href="https://www.patreon.com/jcbrand" target="_blank" rel="noopener">Patreon page</a>
                        If you'd like to sponsor this project, please visit <a href="https://www.patreon.com/jcbrand" target="_blank" rel="noopener">Patreon page</a>
                        or <a href="https://liberapay.com/jcbrand" target="_blank" rel="noopener">Liberapay</a>.
                        or <a href="https://liberapay.com/jcbrand" target="_blank" rel="noopener">Liberapay</a>.

文件差異過大導致無法顯示
+ 228 - 228
locale/af/LC_MESSAGES/converse.po


文件差異過大導致無法顯示
+ 228 - 228
locale/ca/LC_MESSAGES/converse.po


文件差異過大導致無法顯示
+ 279 - 279
locale/converse.pot


文件差異過大導致無法顯示
+ 228 - 228
locale/de/LC_MESSAGES/converse.po


文件差異過大導致無法顯示
+ 279 - 279
locale/es/LC_MESSAGES/converse.po


文件差異過大導致無法顯示
+ 0 - 0
locale/fr/LC_MESSAGES/converse.json


文件差異過大導致無法顯示
+ 230 - 230
locale/fr/LC_MESSAGES/converse.po


文件差異過大導致無法顯示
+ 279 - 279
locale/he/LC_MESSAGES/converse.po


文件差異過大導致無法顯示
+ 279 - 279
locale/hu/LC_MESSAGES/converse.po


文件差異過大導致無法顯示
+ 279 - 279
locale/id/LC_MESSAGES/converse.po


文件差異過大導致無法顯示
+ 257 - 257
locale/it/LC_MESSAGES/converse.po


文件差異過大導致無法顯示
+ 0 - 0
locale/ja/LC_MESSAGES/converse.json


文件差異過大導致無法顯示
+ 285 - 282
locale/ja/LC_MESSAGES/converse.po


文件差異過大導致無法顯示
+ 0 - 0
locale/nb/LC_MESSAGES/converse.json


文件差異過大導致無法顯示
+ 230 - 230
locale/nb/LC_MESSAGES/converse.po


文件差異過大導致無法顯示
+ 0 - 0
locale/nl/LC_MESSAGES/converse.json


文件差異過大導致無法顯示
+ 232 - 231
locale/nl/LC_MESSAGES/converse.po


文件差異過大導致無法顯示
+ 228 - 228
locale/pl/LC_MESSAGES/converse.po


文件差異過大導致無法顯示
+ 279 - 279
locale/pt_BR/LC_MESSAGES/converse.po


文件差異過大導致無法顯示
+ 228 - 228
locale/ru/LC_MESSAGES/converse.po


文件差異過大導致無法顯示
+ 0 - 0
locale/uk/LC_MESSAGES/converse.json


文件差異過大導致無法顯示
+ 232 - 232
locale/uk/LC_MESSAGES/converse.po


文件差異過大導致無法顯示
+ 279 - 279
locale/zh_CN/LC_MESSAGES/converse.po


文件差異過大導致無法顯示
+ 279 - 279
locale/zh_TW/LC_MESSAGES/converse.po


+ 1 - 1
package-lock.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "converse.js",
   "name": "converse.js",
-  "version": "3.3.1",
+  "version": "3.3.2",
   "lockfileVersion": 1,
   "lockfileVersion": 1,
   "requires": true,
   "requires": true,
   "dependencies": {
   "dependencies": {

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "converse.js",
   "name": "converse.js",
-  "version": "3.3.1",
+  "version": "3.3.2",
   "description": "Browser based XMPP instant messaging client",
   "description": "Browser based XMPP instant messaging client",
   "main": "main.js",
   "main": "main.js",
   "directories": {
   "directories": {

+ 1 - 1
src/start.frag

@@ -2,7 +2,7 @@
  *
  *
  *  An XMPP chat client that runs in the browser.
  *  An XMPP chat client that runs in the browser.
  *
  *
- *  Version: 3.3.1
+ *  Version: 3.3.2
  */
  */
 
 
 /* jshint ignore:start */
 /* jshint ignore:start */

部分文件因文件數量過多而無法顯示