JC Brand преди 7 години
родител
ревизия
6b644d6d11
променени са 34 файла, в които са добавени 5174 реда и са изтрити 5159 реда
  1. 1 1
      CHANGES.md
  2. 1 1
      COPYRIGHT
  3. 1 1
      Makefile
  4. 300 295
      dist/converse-no-dependencies.js
  5. 27 21
      dist/converse.js
  6. 2 2
      docs/source/conf.py
  7. 1 1
      index.html
  8. 228 228
      locale/af/LC_MESSAGES/converse.po
  9. 228 228
      locale/ca/LC_MESSAGES/converse.po
  10. 279 279
      locale/converse.pot
  11. 228 228
      locale/de/LC_MESSAGES/converse.po
  12. 279 279
      locale/es/LC_MESSAGES/converse.po
  13. 0 0
      locale/fr/LC_MESSAGES/converse.json
  14. 230 230
      locale/fr/LC_MESSAGES/converse.po
  15. 279 279
      locale/he/LC_MESSAGES/converse.po
  16. 279 279
      locale/hu/LC_MESSAGES/converse.po
  17. 279 279
      locale/id/LC_MESSAGES/converse.po
  18. 257 257
      locale/it/LC_MESSAGES/converse.po
  19. 0 0
      locale/ja/LC_MESSAGES/converse.json
  20. 285 282
      locale/ja/LC_MESSAGES/converse.po
  21. 0 0
      locale/nb/LC_MESSAGES/converse.json
  22. 230 230
      locale/nb/LC_MESSAGES/converse.po
  23. 0 0
      locale/nl/LC_MESSAGES/converse.json
  24. 232 231
      locale/nl/LC_MESSAGES/converse.po
  25. 228 228
      locale/pl/LC_MESSAGES/converse.po
  26. 279 279
      locale/pt_BR/LC_MESSAGES/converse.po
  27. 228 228
      locale/ru/LC_MESSAGES/converse.po
  28. 0 0
      locale/uk/LC_MESSAGES/converse.json
  29. 232 232
      locale/uk/LC_MESSAGES/converse.po
  30. 279 279
      locale/zh_CN/LC_MESSAGES/converse.po
  31. 279 279
      locale/zh_TW/LC_MESSAGES/converse.po
  32. 1 1
      package-lock.json
  33. 1 1
      package.json
  34. 1 1
      src/start.frag

+ 1 - 1
CHANGES.md

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

+ 1 - 1
COPYRIGHT

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

+ 1 - 1
Makefile

@@ -71,7 +71,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.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
 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.
  *
- *  Version: 3.3.1
+ *  Version: 3.3.2
  */
 
 /* jshint ignore:start */
@@ -34805,7 +34805,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
 
   var b64_sha1 = Strophe.SHA1.b64_sha1;
   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({
     '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('@');
   };
 
+  u.isValidMUCJID = function (jid) {
+    return !jid.startsWith('@') && !jid.endsWith('@');
+  };
+
   u.isSameBareJID = function (jid1, jid2) {
     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/);
   };
 
-  u.isHeadlineMessage = function (message) {
+  u.isHeadlineMessage = function (_converse, message) {
     var from_jid = message.getAttribute('from');
 
     if (message.getAttribute('type') === 'headline') {
       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, '@')) {
       // Some servers (I'm looking at you Prosody) don't set the message
       // 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);
 
             return true;
-          } else if (utils.isHeadlineMessage(message)) {
+          } else if (utils.isHeadlineMessage(_converse, message)) {
             // XXX: Ideally we wouldn't have to check for headline
             // messages, but Prosody sends headline messages with the
             // wrong type ('chat'), so we need to filter them out here.
@@ -44322,8 +44332,11 @@ return __p
         },
         renderEmojiPicker: function renderEmojiPicker() {
           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() {
           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']);
 
       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')];
@@ -51667,7 +51680,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
           'click .new-msgs-indicator': 'viewUnreadMessages',
           'click .occupant': 'onOccupantClicked',
           'keypress .chat-textarea': 'keyPressed',
-          'click .send-button': 'onSendButtonClicked'
+          'click .send-button': 'onFormSubmitted'
         },
         initialize: function initialize() {
           var _this = this;
@@ -52479,9 +52492,8 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
           }
 
           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() {
           /* Register presence and message handlers for this chat
@@ -53996,12 +54008,6 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
           this.removeSpinner();
         },
         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 div = document.createElement('div');
           div.innerHTML = tpl_room_item({
@@ -54166,7 +54172,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
 
           return {
             'jid': jid,
-            'name': name || Strophe.unescapeNode(Strophe.getNodeFromJid(jid))
+            'name': name || Strophe.unescapeNode(Strophe.getNodeFromJid(jid)) || jid
           };
         },
         openChatRoom: function openChatRoom(ev) {
@@ -64968,7 +64974,7 @@ return __p
           return false;
         } else if (message.getAttribute('type') === 'groupchat') {
           return _converse.shouldNotifyOfGroupMessage(message);
-        } else if (utils.isHeadlineMessage(message)) {
+        } else if (utils.isHeadlineMessage(_converse, message)) {
           // We want to show notifications for headline messages.
           return _converse.isMessageToHiddenChat(message);
         }
@@ -66307,7 +66313,7 @@ return __p
         /* Handler method for all incoming messages of type "headline". */
         var from_jid = message.getAttribute('from');
 
-        if (utils.isHeadlineMessage(message)) {
+        if (utils.isHeadlineMessage(_converse, message)) {
           if (_.includes(from_jid, '@') && !_converse.allow_non_roster_messaging) {
             return;
           }

+ 2 - 2
docs/source/conf.py

@@ -48,9 +48,9 @@ copyright = u'2017, JC Brand'
 # built documents.
 #
 # The short X.Y version.
-version = '3.3.1'
+version = '3.3.2'
 # 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
 # for a list of supported languages.

+ 1 - 1
index.html

@@ -238,7 +238,7 @@
                         </ul>
                     </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.
                        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>.

Файловите разлики са ограничени, защото са твърде много
+ 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",
-  "version": "3.3.1",
+  "version": "3.3.2",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {

+ 1 - 1
package.json

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

+ 1 - 1
src/start.frag

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

Някои файлове не бяха показани, защото твърде много файлове са промени