|
@@ -33199,7 +33199,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
}
|
|
}
|
|
},
|
|
},
|
|
setVCard: function setVCard() {
|
|
setVCard: function setVCard() {
|
|
- if (this.get('type') === 'groupchat') {
|
|
|
|
|
|
+ if (this.get('type') === 'error') {
|
|
|
|
+ return;
|
|
|
|
+ } else if (this.get('type') === 'groupchat') {
|
|
this.vcard = this.getVCardForChatroomOccupant();
|
|
this.vcard = this.getVCardForChatroomOccupant();
|
|
} else {
|
|
} else {
|
|
var jid = this.get('from');
|
|
var jid = this.get('from');
|
|
@@ -40280,7 +40282,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
'click .chat-msg__edit-modal': 'showMessageVersionsModal'
|
|
'click .chat-msg__edit-modal': 'showMessageVersionsModal'
|
|
},
|
|
},
|
|
initialize: function initialize() {
|
|
initialize: function initialize() {
|
|
- this.model.vcard.on('change', this.render, this);
|
|
|
|
|
|
+ if (this.model.vcard) {
|
|
|
|
+ this.model.vcard.on('change', this.render, this);
|
|
|
|
+ }
|
|
|
|
+
|
|
this.model.on('change:correcting', this.onMessageCorrection, this);
|
|
this.model.on('change:correcting', this.onMessageCorrection, this);
|
|
this.model.on('change:message', this.render, this);
|
|
this.model.on('change:message', this.render, this);
|
|
this.model.on('change:progress', this.renderFileUploadProgresBar, this);
|
|
this.model.on('change:progress', this.renderFileUploadProgresBar, this);
|
|
@@ -40334,7 +40339,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
|
|
|
var is_me_message = this.isMeCommand(),
|
|
var is_me_message = this.isMeCommand(),
|
|
moment_time = moment(this.model.get('time')),
|
|
moment_time = moment(this.model.get('time')),
|
|
- role = this.model.vcard.get('role'),
|
|
|
|
|
|
+ role = this.model.vcard ? this.model.vcard.get('role') : null,
|
|
roles = role ? role.split(',') : [];
|
|
roles = role ? role.split(',') : [];
|
|
var msg = u.stringToElement(tpl_message(_.extend(this.model.toJSON(), {
|
|
var msg = u.stringToElement(tpl_message(_.extend(this.model.toJSON(), {
|
|
'__': __,
|
|
'__': __,
|
|
@@ -45594,7 +45599,6 @@ function _instanceof(left, right) { if (right != null && typeof Symbol !== "unde
|
|
algo = {
|
|
algo = {
|
|
'name': 'AES-GCM',
|
|
'name': 'AES-GCM',
|
|
'iv': iv,
|
|
'iv': iv,
|
|
- 'additionalData': new Uint8Array(1),
|
|
|
|
'tagLength': TAG_LENGTH
|
|
'tagLength': TAG_LENGTH
|
|
},
|
|
},
|
|
encrypted = await crypto.subtle.encrypt(algo, key, u.stringToArrayBuffer(plaintext)),
|
|
encrypted = await crypto.subtle.encrypt(algo, key, u.stringToArrayBuffer(plaintext)),
|
|
@@ -45616,7 +45620,6 @@ function _instanceof(left, right) { if (right != null && typeof Symbol !== "unde
|
|
algo = {
|
|
algo = {
|
|
'name': "AES-GCM",
|
|
'name': "AES-GCM",
|
|
'iv': u.base64ToArrayBuffer(obj.iv),
|
|
'iv': u.base64ToArrayBuffer(obj.iv),
|
|
- 'additionalData': new Uint8Array(1),
|
|
|
|
'tagLength': TAG_LENGTH
|
|
'tagLength': TAG_LENGTH
|
|
};
|
|
};
|
|
return u.arrayBufferToString((await crypto.subtle.decrypt(algo, key_obj, cipher)));
|
|
return u.arrayBufferToString((await crypto.subtle.decrypt(algo, key_obj, cipher)));
|