sceyt-chat-react-uikit 1.6.2 → 1.6.3-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ChatContainer/index.d.ts +2 -1
- package/index.js +425 -405
- package/index.modern.js +425 -405
- package/package.json +2 -1
package/index.js
CHANGED
|
@@ -22,6 +22,7 @@ function _interopNamespace(e) {
|
|
|
22
22
|
var React = require('react');
|
|
23
23
|
var React__default = _interopDefault(React);
|
|
24
24
|
var reactRedux = require('react-redux');
|
|
25
|
+
var log = _interopDefault(require('loglevel'));
|
|
25
26
|
var createSagaMiddleware = require('redux-saga');
|
|
26
27
|
var createSagaMiddleware__default = _interopDefault(createSagaMiddleware);
|
|
27
28
|
var redux = require('redux');
|
|
@@ -7768,7 +7769,7 @@ var pauseUpload = function pauseUpload(attachmentId) {
|
|
|
7768
7769
|
if (pendingUploaders[attachmentId]) {
|
|
7769
7770
|
return pendingUploaders[attachmentId].stop();
|
|
7770
7771
|
} else {
|
|
7771
|
-
|
|
7772
|
+
log.info('Unknown uploading task');
|
|
7772
7773
|
return false;
|
|
7773
7774
|
}
|
|
7774
7775
|
};
|
|
@@ -7776,7 +7777,7 @@ var resumeUpload = function resumeUpload(attachmentId) {
|
|
|
7776
7777
|
if (pendingUploaders[attachmentId]) {
|
|
7777
7778
|
return pendingUploaders[attachmentId].resume();
|
|
7778
7779
|
} else {
|
|
7779
|
-
|
|
7780
|
+
log.info('Unknown uploading task');
|
|
7780
7781
|
return false;
|
|
7781
7782
|
}
|
|
7782
7783
|
};
|
|
@@ -7844,7 +7845,7 @@ var downloadFile = function downloadFile(attachment, download, done, progressCal
|
|
|
7844
7845
|
}();
|
|
7845
7846
|
if (_temp && _temp.then) return _temp.then(function () {});
|
|
7846
7847
|
}, function (e) {
|
|
7847
|
-
|
|
7848
|
+
log.info('error on download... ', e);
|
|
7848
7849
|
if (done) {
|
|
7849
7850
|
done(attachment.id || '', true);
|
|
7850
7851
|
}
|
|
@@ -8550,7 +8551,7 @@ var MessageReducer = (function (state, _temp) {
|
|
|
8550
8551
|
return message;
|
|
8551
8552
|
});
|
|
8552
8553
|
if (!messageFound && addIfNotExists) {
|
|
8553
|
-
|
|
8554
|
+
log.info('message not found on update message, add message to list .. ...', params);
|
|
8554
8555
|
newState.activeChannelMessages = [].concat(newState.activeChannelMessages, [params]);
|
|
8555
8556
|
}
|
|
8556
8557
|
return newState;
|
|
@@ -8859,7 +8860,7 @@ var MembersReducer = (function (state, _ref) {
|
|
|
8859
8860
|
case UPDATE_MEMBERS:
|
|
8860
8861
|
{
|
|
8861
8862
|
var _members2 = payload.members;
|
|
8862
|
-
|
|
8863
|
+
log.info('UPDATE_MEMBERS . ... .. ', _members2);
|
|
8863
8864
|
var updateMembers = [];
|
|
8864
8865
|
var membersCopy = [].concat(newState.activeChannelMembers);
|
|
8865
8866
|
if (_members2.length) {
|
|
@@ -8880,7 +8881,7 @@ var MembersReducer = (function (state, _ref) {
|
|
|
8880
8881
|
case UPDATE_MEMBERS_PRESENCE:
|
|
8881
8882
|
{
|
|
8882
8883
|
var usersMap = payload.usersMap;
|
|
8883
|
-
|
|
8884
|
+
log.info('UPDATE_MEMBERS_PRESENCE . ... .. ', usersMap);
|
|
8884
8885
|
var _updateMembers = [];
|
|
8885
8886
|
if (newState.activeChannelMembers.length) {
|
|
8886
8887
|
var _membersCopy = [].concat(newState.activeChannelMembers);
|
|
@@ -11368,7 +11369,7 @@ var MessageTextFormat = function MessageTextFormat(_ref2) {
|
|
|
11368
11369
|
try {
|
|
11369
11370
|
var messageText = [];
|
|
11370
11371
|
var linkify = new LinkifyIt();
|
|
11371
|
-
var messageBodyAttributes = message.bodyAttributes &&
|
|
11372
|
+
var messageBodyAttributes = message.bodyAttributes && JSON.parse(JSON.stringify(message.bodyAttributes));
|
|
11372
11373
|
if (message.body && messageBodyAttributes && messageBodyAttributes.length > 0) {
|
|
11373
11374
|
var combinedAttributesList = combineMessageAttributes(messageBodyAttributes);
|
|
11374
11375
|
var textPart = text;
|
|
@@ -11435,7 +11436,7 @@ var MessageTextFormat = function MessageTextFormat(_ref2) {
|
|
|
11435
11436
|
}, "" + text.slice(attributeOffset, attributeOffset + attribute.length))), index === combinedAttributesList.length - 1 ? secondPart : '');
|
|
11436
11437
|
}
|
|
11437
11438
|
} catch (e) {
|
|
11438
|
-
|
|
11439
|
+
log.info('Error on format message text, message: ', message, 'error: ', e);
|
|
11439
11440
|
}
|
|
11440
11441
|
});
|
|
11441
11442
|
} else {
|
|
@@ -11446,8 +11447,8 @@ var MessageTextFormat = function MessageTextFormat(_ref2) {
|
|
|
11446
11447
|
}
|
|
11447
11448
|
return messageText.length > 1 ? asSampleText ? messageText.join('') : messageText : text;
|
|
11448
11449
|
} catch (e) {
|
|
11449
|
-
|
|
11450
|
-
|
|
11450
|
+
log.info(' failed to format message .>>> ', e);
|
|
11451
|
+
log.info('message: ', message);
|
|
11451
11452
|
return text;
|
|
11452
11453
|
}
|
|
11453
11454
|
};
|
|
@@ -11831,7 +11832,7 @@ function watchForEvents() {
|
|
|
11831
11832
|
};
|
|
11832
11833
|
});
|
|
11833
11834
|
_loop = /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
11834
|
-
var _yield$take, type, args, createdChannel, channelFilterTypes, getFromContacts, channelExists, _chan, channel, _chan2, _channel, member, _channelExists, _activeChannelId, groupName, _channel2, _channelExists2, _channel3, removedMembers, _activeChannelId2, _channelExists3, activeChannel, _groupName, _channel4, addedMembers, _activeChannelId3, _channelExists4, _groupName2, updatedChannel, _channelExists5, subject, avatarUrl, muted, mutedTill, _groupName3, _channel5, message, messageToHandle, _channelFilterTypes,
|
|
11835
|
+
var _yield$take, type, args, createdChannel, channelFilterTypes, getFromContacts, channelExists, _chan, channel, _chan2, _channel, member, _channelExists, _activeChannelId, groupName, _channel2, _channelExists2, _channel3, removedMembers, _activeChannelId2, _channelExists3, activeChannel, _groupName, _channel4, addedMembers, _activeChannelId3, _channelExists4, _groupName2, updatedChannel, _channelExists5, subject, avatarUrl, muted, mutedTill, metadata, _activeChannelId4, _groupName3, _channel5, message, messageToHandle, _channelFilterTypes, _activeChannelId5, _channelExists6, channelForAdd, hasNextMessage, _groupName4, showNotifications, tabIsActive, contactsMap, _getFromContacts, messageBody, channelId, markerList, _channel6, _activeChannelId6, updateLastMessage, markersMap, lastMessage, _channel7, from, _channel8, _from, _channelId, _channel9, _channel10, deletedMessage, _activeChannelId7, _channelExists7, _channel11, _message, _activeChannelId8, _channelExists8, _channel12, user, _message2, reaction, isSelf, _activeChannelId9, _contactsMap, _getFromContacts2, _messageBody, channelUpdateParams, _channel13, _user, _message3, _reaction, channelFromMap, _isSelf, _activeChannelId10, _channelUpdateParams, _channel14, _updatedChannel, _channel15, _activeChannelId11, channelExist, _channel16, _channel17, _channel18, _channel19, _channel20, _channel21, _channel22, _groupName5, _channel23, _groupName6, _channel24, members, _activeChannelId12, i, _channel25, _channel26, status;
|
|
11835
11836
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11836
11837
|
while (1) switch (_context.prev = _context.next) {
|
|
11837
11838
|
case 0:
|
|
@@ -11842,11 +11843,11 @@ function watchForEvents() {
|
|
|
11842
11843
|
type = _yield$take.type;
|
|
11843
11844
|
args = _yield$take.args;
|
|
11844
11845
|
_context.t0 = type;
|
|
11845
|
-
_context.next = _context.t0 === CHANNEL_EVENT_TYPES.CREATE ? 8 : _context.t0 === CHANNEL_EVENT_TYPES.JOIN ? 25 : _context.t0 === CHANNEL_EVENT_TYPES.LEAVE ? 34 : _context.t0 === CHANNEL_EVENT_TYPES.BLOCK ? 58 : _context.t0 === CHANNEL_EVENT_TYPES.UNBLOCK ? 65 : _context.t0 === CHANNEL_EVENT_TYPES.KICK_MEMBERS ? 67 : _context.t0 === CHANNEL_EVENT_TYPES.ADD_MEMBERS ? 96 : _context.t0 === CHANNEL_EVENT_TYPES.UPDATE_CHANNEL ? 119 : _context.t0 === CHANNEL_EVENT_TYPES.MESSAGE ?
|
|
11846
|
+
_context.next = _context.t0 === CHANNEL_EVENT_TYPES.CREATE ? 8 : _context.t0 === CHANNEL_EVENT_TYPES.JOIN ? 25 : _context.t0 === CHANNEL_EVENT_TYPES.LEAVE ? 34 : _context.t0 === CHANNEL_EVENT_TYPES.BLOCK ? 58 : _context.t0 === CHANNEL_EVENT_TYPES.UNBLOCK ? 65 : _context.t0 === CHANNEL_EVENT_TYPES.KICK_MEMBERS ? 67 : _context.t0 === CHANNEL_EVENT_TYPES.ADD_MEMBERS ? 96 : _context.t0 === CHANNEL_EVENT_TYPES.UPDATE_CHANNEL ? 119 : _context.t0 === CHANNEL_EVENT_TYPES.MESSAGE ? 136 : _context.t0 === CHANNEL_EVENT_TYPES.MESSAGE_MARKERS_RECEIVED ? 199 : _context.t0 === CHANNEL_EVENT_TYPES.START_TYPING ? 222 : _context.t0 === CHANNEL_EVENT_TYPES.STOP_TYPING ? 228 : _context.t0 === CHANNEL_EVENT_TYPES.DELETE ? 233 : _context.t0 === CHANNEL_EVENT_TYPES.DELETE_MESSAGE ? 240 : _context.t0 === CHANNEL_EVENT_TYPES.EDIT_MESSAGE ? 257 : _context.t0 === CHANNEL_EVENT_TYPES.REACTION_ADDED ? 272 : _context.t0 === CHANNEL_EVENT_TYPES.REACTION_DELETED ? 296 : _context.t0 === CHANNEL_EVENT_TYPES.UNREAD_MESSAGES_INFO ? 312 : _context.t0 === CHANNEL_EVENT_TYPES.CLEAR_HISTORY ? 319 : _context.t0 === CHANNEL_EVENT_TYPES.MUTE ? 337 : _context.t0 === CHANNEL_EVENT_TYPES.UNMUTE ? 343 : _context.t0 === CHANNEL_EVENT_TYPES.PINED ? 349 : _context.t0 === CHANNEL_EVENT_TYPES.UNPINED ? 355 : _context.t0 === CHANNEL_EVENT_TYPES.HIDE ? 361 : _context.t0 === CHANNEL_EVENT_TYPES.UNHIDE ? 366 : _context.t0 === CHANNEL_EVENT_TYPES.CHANNEL_MARKED_AS_UNREAD ? 371 : _context.t0 === CHANNEL_EVENT_TYPES.CHANNEL_MARKED_AS_READ ? 379 : _context.t0 === CHANNEL_EVENT_TYPES.CHANGE_ROLE ? 387 : _context.t0 === CHANNEL_EVENT_TYPES.FROZEN ? 406 : _context.t0 === CHANNEL_EVENT_TYPES.UNFROZEN ? 409 : _context.t0 === CHANNEL_EVENT_TYPES.CHANNEL_EVENT ? 412 : _context.t0 === CONNECTION_EVENT_TYPES.CONNECTION_STATUS_CHANGED ? 414 : 422;
|
|
11846
11847
|
break;
|
|
11847
11848
|
case 8:
|
|
11848
11849
|
createdChannel = args.createdChannel;
|
|
11849
|
-
|
|
11850
|
+
log.info('CHANNEL_EVENT_CREATE ... ', createdChannel);
|
|
11850
11851
|
channelFilterTypes = getChannelTypesFilter();
|
|
11851
11852
|
if (!(channelFilterTypes !== null && channelFilterTypes !== void 0 && channelFilterTypes.length ? channelFilterTypes.includes(createdChannel.type) : true)) {
|
|
11852
11853
|
_context.next = 24;
|
|
@@ -11876,10 +11877,10 @@ function watchForEvents() {
|
|
|
11876
11877
|
addChannelToAllChannels(createdChannel);
|
|
11877
11878
|
}
|
|
11878
11879
|
case 24:
|
|
11879
|
-
return _context.abrupt("break",
|
|
11880
|
+
return _context.abrupt("break", 423);
|
|
11880
11881
|
case 25:
|
|
11881
11882
|
channel = args.channel;
|
|
11882
|
-
|
|
11883
|
+
log.info('channel JOIN ... . ', channel);
|
|
11883
11884
|
_context.next = 29;
|
|
11884
11885
|
return effects.call(getActiveChannelId);
|
|
11885
11886
|
case 29:
|
|
@@ -11887,10 +11888,10 @@ function watchForEvents() {
|
|
|
11887
11888
|
if (!_chan2) {
|
|
11888
11889
|
addChannelToAllChannels(channel);
|
|
11889
11890
|
}
|
|
11890
|
-
return _context.abrupt("break",
|
|
11891
|
+
return _context.abrupt("break", 423);
|
|
11891
11892
|
case 34:
|
|
11892
11893
|
_channel = args.channel, member = args.member;
|
|
11893
|
-
|
|
11894
|
+
log.info('channel LEAVE ... ', _channel, member);
|
|
11894
11895
|
_channelExists = checkChannelExists(_channel.id);
|
|
11895
11896
|
_context.next = 39;
|
|
11896
11897
|
return effects.call(getActiveChannelId);
|
|
@@ -11940,9 +11941,9 @@ function watchForEvents() {
|
|
|
11940
11941
|
mutedTill: _channel.mutedTill
|
|
11941
11942
|
});
|
|
11942
11943
|
case 57:
|
|
11943
|
-
return _context.abrupt("break",
|
|
11944
|
+
return _context.abrupt("break", 423);
|
|
11944
11945
|
case 58:
|
|
11945
|
-
|
|
11946
|
+
log.info('channel BLOCK ... ');
|
|
11946
11947
|
_channel2 = args.channel;
|
|
11947
11948
|
_channelExists2 = checkChannelExists(_channel2.id);
|
|
11948
11949
|
if (!_channelExists2) {
|
|
@@ -11952,13 +11953,13 @@ function watchForEvents() {
|
|
|
11952
11953
|
_context.next = 64;
|
|
11953
11954
|
return effects.put(removeChannelAC(_channel2.id));
|
|
11954
11955
|
case 64:
|
|
11955
|
-
return _context.abrupt("break",
|
|
11956
|
+
return _context.abrupt("break", 423);
|
|
11956
11957
|
case 65:
|
|
11957
|
-
|
|
11958
|
-
return _context.abrupt("break",
|
|
11958
|
+
log.info('channel UNBLOCK ... ');
|
|
11959
|
+
return _context.abrupt("break", 423);
|
|
11959
11960
|
case 67:
|
|
11960
11961
|
_channel3 = args.channel, removedMembers = args.removedMembers;
|
|
11961
|
-
|
|
11962
|
+
log.info('channel KICK_MEMBERS ... ', removedMembers);
|
|
11962
11963
|
_context.next = 71;
|
|
11963
11964
|
return effects.call(getActiveChannelId);
|
|
11964
11965
|
case 71:
|
|
@@ -12019,10 +12020,10 @@ function watchForEvents() {
|
|
|
12019
12020
|
muted: _channel3.muted,
|
|
12020
12021
|
mutedTill: _channel3.mutedTill
|
|
12021
12022
|
});
|
|
12022
|
-
return _context.abrupt("break",
|
|
12023
|
+
return _context.abrupt("break", 423);
|
|
12023
12024
|
case 96:
|
|
12024
12025
|
_channel4 = args.channel, addedMembers = args.addedMembers;
|
|
12025
|
-
|
|
12026
|
+
log.info('channel ADD_MEMBERS ... ', addedMembers);
|
|
12026
12027
|
_context.next = 100;
|
|
12027
12028
|
return effects.call(getActiveChannelId);
|
|
12028
12029
|
case 100:
|
|
@@ -12068,13 +12069,13 @@ function watchForEvents() {
|
|
|
12068
12069
|
muted: _channel4.muted,
|
|
12069
12070
|
mutedTill: _channel4.mutedTill
|
|
12070
12071
|
});
|
|
12071
|
-
return _context.abrupt("break",
|
|
12072
|
+
return _context.abrupt("break", 423);
|
|
12072
12073
|
case 119:
|
|
12073
12074
|
updatedChannel = args.updatedChannel;
|
|
12074
12075
|
_channelExists5 = checkChannelExists(updatedChannel.id);
|
|
12075
|
-
subject = updatedChannel.subject, avatarUrl = updatedChannel.avatarUrl, muted = updatedChannel.muted, mutedTill = updatedChannel.mutedTill;
|
|
12076
|
+
subject = updatedChannel.subject, avatarUrl = updatedChannel.avatarUrl, muted = updatedChannel.muted, mutedTill = updatedChannel.mutedTill, metadata = updatedChannel.metadata;
|
|
12076
12077
|
if (!_channelExists5) {
|
|
12077
|
-
_context.next =
|
|
12078
|
+
_context.next = 131;
|
|
12078
12079
|
break;
|
|
12079
12080
|
}
|
|
12080
12081
|
_context.next = 125;
|
|
@@ -12085,117 +12086,131 @@ function watchForEvents() {
|
|
|
12085
12086
|
mutedTill: mutedTill
|
|
12086
12087
|
}));
|
|
12087
12088
|
case 125:
|
|
12089
|
+
_context.next = 127;
|
|
12090
|
+
return effects.call(getActiveChannelId);
|
|
12091
|
+
case 127:
|
|
12092
|
+
_activeChannelId4 = _context.sent;
|
|
12093
|
+
if (!(_activeChannelId4 === updatedChannel.id)) {
|
|
12094
|
+
_context.next = 131;
|
|
12095
|
+
break;
|
|
12096
|
+
}
|
|
12097
|
+
_context.next = 131;
|
|
12098
|
+
return effects.put(setActiveChannelAC(_extends({}, updatedChannel, {
|
|
12099
|
+
metadata: isJSON(metadata) ? JSON.parse(metadata) : metadata
|
|
12100
|
+
})));
|
|
12101
|
+
case 131:
|
|
12088
12102
|
_groupName3 = getChannelGroupName(updatedChannel);
|
|
12089
|
-
_context.next =
|
|
12103
|
+
_context.next = 134;
|
|
12090
12104
|
return effects.put(updateSearchedChannelDataAC(updatedChannel.id, {
|
|
12091
12105
|
subject: subject,
|
|
12092
12106
|
avatarUrl: avatarUrl,
|
|
12093
12107
|
muted: muted,
|
|
12094
12108
|
mutedTill: mutedTill
|
|
12095
12109
|
}, _groupName3));
|
|
12096
|
-
case
|
|
12110
|
+
case 134:
|
|
12097
12111
|
updateChannelOnAllChannels(updatedChannel.id, {
|
|
12098
12112
|
subject: subject,
|
|
12099
12113
|
avatarUrl: avatarUrl,
|
|
12100
12114
|
muted: muted,
|
|
12101
|
-
mutedTill: mutedTill
|
|
12115
|
+
mutedTill: mutedTill,
|
|
12116
|
+
metadata: isJSON(metadata) ? JSON.parse(metadata) : metadata
|
|
12102
12117
|
});
|
|
12103
|
-
return _context.abrupt("break",
|
|
12104
|
-
case
|
|
12118
|
+
return _context.abrupt("break", 423);
|
|
12119
|
+
case 136:
|
|
12105
12120
|
_channel5 = args.channel, message = args.message;
|
|
12106
|
-
|
|
12121
|
+
log.info('channel MESSAGE ... id : ', message.id, ' message: ', message, ' channel.id: ', _channel5.id);
|
|
12107
12122
|
messageToHandle = handleNewMessages ? handleNewMessages(message, _channel5) : message;
|
|
12108
12123
|
_channelFilterTypes = getChannelTypesFilter();
|
|
12109
12124
|
if (!(messageToHandle && _channel5 && (_channelFilterTypes !== null && _channelFilterTypes !== void 0 && _channelFilterTypes.length ? _channelFilterTypes.includes(_channel5.type) : true))) {
|
|
12110
|
-
_context.next =
|
|
12125
|
+
_context.next = 198;
|
|
12111
12126
|
break;
|
|
12112
12127
|
}
|
|
12113
12128
|
_channel5.metadata = isJSON(_channel5.metadata) ? JSON.parse(_channel5.metadata) : _channel5.metadata;
|
|
12114
|
-
_context.next =
|
|
12129
|
+
_context.next = 144;
|
|
12115
12130
|
return effects.call(getActiveChannelId);
|
|
12116
|
-
case
|
|
12117
|
-
|
|
12131
|
+
case 144:
|
|
12132
|
+
_activeChannelId5 = _context.sent;
|
|
12118
12133
|
_channelExists6 = checkChannelExists(_channel5.id);
|
|
12119
12134
|
channelForAdd = JSON.parse(JSON.stringify(_channel5));
|
|
12120
|
-
_context.next =
|
|
12135
|
+
_context.next = 149;
|
|
12121
12136
|
return effects.put(addChannelAC(channelForAdd));
|
|
12122
|
-
case
|
|
12137
|
+
case 149:
|
|
12123
12138
|
if (_channelExists6) {
|
|
12124
|
-
_context.next =
|
|
12139
|
+
_context.next = 154;
|
|
12125
12140
|
break;
|
|
12126
12141
|
}
|
|
12127
|
-
_context.next =
|
|
12142
|
+
_context.next = 152;
|
|
12128
12143
|
return effects.call(setChannelInMap, _channel5);
|
|
12129
|
-
case
|
|
12130
|
-
_context.next =
|
|
12144
|
+
case 152:
|
|
12145
|
+
_context.next = 157;
|
|
12131
12146
|
break;
|
|
12132
|
-
case
|
|
12147
|
+
case 154:
|
|
12133
12148
|
if (message.repliedInThread) {
|
|
12134
|
-
_context.next =
|
|
12149
|
+
_context.next = 157;
|
|
12135
12150
|
break;
|
|
12136
12151
|
}
|
|
12137
|
-
_context.next =
|
|
12152
|
+
_context.next = 157;
|
|
12138
12153
|
return effects.put(updateChannelLastMessageAC(message, channelForAdd));
|
|
12139
|
-
case
|
|
12140
|
-
if (!(_channel5.id ===
|
|
12141
|
-
_context.next =
|
|
12154
|
+
case 157:
|
|
12155
|
+
if (!(_channel5.id === _activeChannelId5)) {
|
|
12156
|
+
_context.next = 169;
|
|
12142
12157
|
break;
|
|
12143
12158
|
}
|
|
12144
12159
|
if (getHasNextCached()) {
|
|
12145
|
-
_context.next =
|
|
12160
|
+
_context.next = 161;
|
|
12146
12161
|
break;
|
|
12147
12162
|
}
|
|
12148
|
-
_context.next =
|
|
12163
|
+
_context.next = 161;
|
|
12149
12164
|
return effects.put(addMessageAC(message));
|
|
12150
|
-
case
|
|
12165
|
+
case 161:
|
|
12151
12166
|
addAllMessages([message], MESSAGE_LOAD_DIRECTION.NEXT);
|
|
12152
|
-
_context.next =
|
|
12167
|
+
_context.next = 165;
|
|
12153
12168
|
return effects.select(messagesHasNextSelector);
|
|
12154
|
-
case
|
|
12169
|
+
case 165:
|
|
12155
12170
|
hasNextMessage = _context.sent;
|
|
12156
12171
|
if (!(!getHasNextCached() && !hasNextMessage)) {
|
|
12157
|
-
_context.next =
|
|
12172
|
+
_context.next = 169;
|
|
12158
12173
|
break;
|
|
12159
12174
|
}
|
|
12160
|
-
_context.next =
|
|
12175
|
+
_context.next = 169;
|
|
12161
12176
|
return effects.put(scrollToNewMessageAC(true, false, true));
|
|
12162
|
-
case
|
|
12177
|
+
case 169:
|
|
12163
12178
|
if (getMessagesFromMap(_channel5.id) && getMessagesFromMap(_channel5.id).length) {
|
|
12164
12179
|
addMessageToMap(_channel5.id, message);
|
|
12165
12180
|
}
|
|
12166
|
-
_context.next =
|
|
12181
|
+
_context.next = 172;
|
|
12167
12182
|
return effects.put(updateChannelDataAC(_channel5.id, _extends({}, channelForAdd, {
|
|
12168
12183
|
userMessageReactions: [],
|
|
12169
12184
|
lastReactedMessage: null
|
|
12170
12185
|
})));
|
|
12171
|
-
case
|
|
12186
|
+
case 172:
|
|
12172
12187
|
_groupName4 = getChannelGroupName(_channel5);
|
|
12173
|
-
_context.next =
|
|
12188
|
+
_context.next = 175;
|
|
12174
12189
|
return effects.put(updateSearchedChannelDataAC(_channel5.id, _extends({}, channelForAdd, {
|
|
12175
12190
|
userMessageReactions: [],
|
|
12176
12191
|
lastReactedMessage: null
|
|
12177
12192
|
}), _groupName4));
|
|
12178
|
-
case
|
|
12193
|
+
case 175:
|
|
12179
12194
|
showNotifications = getShowNotifications();
|
|
12180
12195
|
if (!(showNotifications && !message.silent && message.user.id !== SceytChatClient.user.id && !_channel5.muted)) {
|
|
12181
|
-
_context.next =
|
|
12196
|
+
_context.next = 188;
|
|
12182
12197
|
break;
|
|
12183
12198
|
}
|
|
12184
12199
|
if (!(Notification.permission === 'granted')) {
|
|
12185
|
-
_context.next =
|
|
12200
|
+
_context.next = 188;
|
|
12186
12201
|
break;
|
|
12187
12202
|
}
|
|
12188
|
-
_context.next =
|
|
12203
|
+
_context.next = 180;
|
|
12189
12204
|
return effects.select(browserTabIsActiveSelector);
|
|
12190
|
-
case
|
|
12205
|
+
case 180:
|
|
12191
12206
|
tabIsActive = _context.sent;
|
|
12192
|
-
if (!(document.visibilityState !== 'visible' || !tabIsActive || _channel5.id !==
|
|
12193
|
-
_context.next =
|
|
12207
|
+
if (!(document.visibilityState !== 'visible' || !tabIsActive || _channel5.id !== _activeChannelId5)) {
|
|
12208
|
+
_context.next = 188;
|
|
12194
12209
|
break;
|
|
12195
12210
|
}
|
|
12196
|
-
_context.next =
|
|
12211
|
+
_context.next = 184;
|
|
12197
12212
|
return effects.select(contactsMapSelector);
|
|
12198
|
-
case
|
|
12213
|
+
case 184:
|
|
12199
12214
|
contactsMap = _context.sent;
|
|
12200
12215
|
_getFromContacts = getShowOnlyContactUsers();
|
|
12201
12216
|
messageBody = MessageTextFormat({
|
|
@@ -12209,43 +12224,43 @@ function watchForEvents() {
|
|
|
12209
12224
|
setNotification(messageBody, message.user, _channel5, undefined, message.attachments && message.attachments.length ? message.attachments.find(function (att) {
|
|
12210
12225
|
return att.type !== attachmentTypes.link;
|
|
12211
12226
|
}) : undefined);
|
|
12212
|
-
case
|
|
12213
|
-
|
|
12227
|
+
case 188:
|
|
12228
|
+
log.info('send delivered for message . .. . ', message);
|
|
12214
12229
|
if (!(message.repliedInThread && message.parentMessage.id)) {
|
|
12215
|
-
_context.next =
|
|
12230
|
+
_context.next = 194;
|
|
12216
12231
|
break;
|
|
12217
12232
|
}
|
|
12218
|
-
_context.next =
|
|
12233
|
+
_context.next = 192;
|
|
12219
12234
|
return effects.put(markMessagesAsDeliveredAC(message.parentMessage.id, [message.id]));
|
|
12220
|
-
case
|
|
12221
|
-
_context.next =
|
|
12235
|
+
case 192:
|
|
12236
|
+
_context.next = 196;
|
|
12222
12237
|
break;
|
|
12223
|
-
case
|
|
12224
|
-
_context.next =
|
|
12238
|
+
case 194:
|
|
12239
|
+
_context.next = 196;
|
|
12225
12240
|
return effects.put(markMessagesAsDeliveredAC(_channel5.id, [message.id]));
|
|
12226
|
-
case
|
|
12241
|
+
case 196:
|
|
12227
12242
|
updateChannelOnAllChannels(_channel5.id, _extends({}, channelForAdd, {
|
|
12228
12243
|
userMessageReactions: [],
|
|
12229
12244
|
lastReactedMessage: null
|
|
12230
12245
|
}));
|
|
12231
12246
|
updateChannelLastMessageOnAllChannels(_channel5.id, _channel5.lastMessage);
|
|
12232
|
-
case
|
|
12233
|
-
return _context.abrupt("break",
|
|
12234
|
-
case
|
|
12247
|
+
case 198:
|
|
12248
|
+
return _context.abrupt("break", 423);
|
|
12249
|
+
case 199:
|
|
12235
12250
|
channelId = args.channelId, markerList = args.markerList;
|
|
12236
|
-
_context.next =
|
|
12251
|
+
_context.next = 202;
|
|
12237
12252
|
return effects.call(getChannelFromMap, channelId);
|
|
12238
|
-
case
|
|
12253
|
+
case 202:
|
|
12239
12254
|
_channel6 = _context.sent;
|
|
12240
|
-
|
|
12255
|
+
log.info('channel MESSAGE_MARKERS_RECEIVED ... channel: ', _channel6, 'markers list: ', markerList);
|
|
12241
12256
|
if (!_channel6) {
|
|
12242
|
-
_context.next =
|
|
12257
|
+
_context.next = 221;
|
|
12243
12258
|
break;
|
|
12244
12259
|
}
|
|
12245
|
-
_context.next =
|
|
12260
|
+
_context.next = 207;
|
|
12246
12261
|
return effects.call(getActiveChannelId);
|
|
12247
|
-
case
|
|
12248
|
-
|
|
12262
|
+
case 207:
|
|
12263
|
+
_activeChannelId6 = _context.sent;
|
|
12249
12264
|
updateLastMessage = false;
|
|
12250
12265
|
markersMap = {};
|
|
12251
12266
|
markerList.messageIds.forEach(function (messageId) {
|
|
@@ -12262,32 +12277,32 @@ function watchForEvents() {
|
|
|
12262
12277
|
});
|
|
12263
12278
|
});
|
|
12264
12279
|
if (!updateLastMessage) {
|
|
12265
|
-
_context.next =
|
|
12280
|
+
_context.next = 216;
|
|
12266
12281
|
break;
|
|
12267
12282
|
}
|
|
12268
12283
|
lastMessage = _extends({}, _channel6.lastMessage, {
|
|
12269
12284
|
deliveryStatus: markerList.name
|
|
12270
12285
|
});
|
|
12271
12286
|
updateChannelLastMessageOnAllChannels(_channel6.id, lastMessage);
|
|
12272
|
-
_context.next =
|
|
12287
|
+
_context.next = 216;
|
|
12273
12288
|
return effects.put(updateChannelLastMessageStatusAC(lastMessage, JSON.parse(JSON.stringify(_channel6))));
|
|
12274
|
-
case
|
|
12275
|
-
if (!(
|
|
12276
|
-
_context.next =
|
|
12289
|
+
case 216:
|
|
12290
|
+
if (!(_activeChannelId6 === channelId)) {
|
|
12291
|
+
_context.next = 220;
|
|
12277
12292
|
break;
|
|
12278
12293
|
}
|
|
12279
|
-
_context.next =
|
|
12294
|
+
_context.next = 219;
|
|
12280
12295
|
return effects.put(updateMessagesStatusAC(markerList.name, markersMap));
|
|
12281
|
-
case
|
|
12296
|
+
case 219:
|
|
12282
12297
|
updateMarkersOnAllMessages(markersMap, markerList.name);
|
|
12283
|
-
case
|
|
12298
|
+
case 220:
|
|
12284
12299
|
updateMessageStatusOnMap(_channel6.id, {
|
|
12285
12300
|
name: markerList.name,
|
|
12286
12301
|
markersMap: markersMap
|
|
12287
12302
|
});
|
|
12288
|
-
case
|
|
12289
|
-
return _context.abrupt("break",
|
|
12290
|
-
case
|
|
12303
|
+
case 221:
|
|
12304
|
+
return _context.abrupt("break", 423);
|
|
12305
|
+
case 222:
|
|
12291
12306
|
_channel7 = args.channel, from = args.from;
|
|
12292
12307
|
if (typingUsersTimeout[from.id]) {
|
|
12293
12308
|
clearTimeout(typingUsersTimeout[from.id]);
|
|
@@ -12295,79 +12310,79 @@ function watchForEvents() {
|
|
|
12295
12310
|
typingUsersTimeout[from.id] = setTimeout(function () {
|
|
12296
12311
|
channelListener.onMemberStoppedTyping(_channel7, from);
|
|
12297
12312
|
}, 4000);
|
|
12298
|
-
_context.next =
|
|
12313
|
+
_context.next = 227;
|
|
12299
12314
|
return effects.put(switchTypingIndicatorAC(true, _channel7.id, from));
|
|
12300
|
-
case
|
|
12301
|
-
return _context.abrupt("break",
|
|
12302
|
-
case
|
|
12315
|
+
case 227:
|
|
12316
|
+
return _context.abrupt("break", 423);
|
|
12317
|
+
case 228:
|
|
12303
12318
|
_channel8 = args.channel, _from = args.from;
|
|
12304
12319
|
if (typingUsersTimeout[_from.id]) {
|
|
12305
12320
|
clearTimeout(typingUsersTimeout[_from.id]);
|
|
12306
12321
|
}
|
|
12307
|
-
_context.next =
|
|
12322
|
+
_context.next = 232;
|
|
12308
12323
|
return effects.put(switchTypingIndicatorAC(false, _channel8.id, _from));
|
|
12309
|
-
case
|
|
12310
|
-
return _context.abrupt("break",
|
|
12311
|
-
case
|
|
12324
|
+
case 232:
|
|
12325
|
+
return _context.abrupt("break", 423);
|
|
12326
|
+
case 233:
|
|
12312
12327
|
_channelId = args.channelId;
|
|
12313
|
-
|
|
12328
|
+
log.info('channel DELETE ... ');
|
|
12314
12329
|
_channel9 = getChannelFromMap(_channelId);
|
|
12315
|
-
_context.next =
|
|
12330
|
+
_context.next = 238;
|
|
12316
12331
|
return effects.put(setChannelToRemoveAC(_channel9));
|
|
12317
|
-
case
|
|
12332
|
+
case 238:
|
|
12318
12333
|
deleteChannelFromAllChannels(_channelId);
|
|
12319
|
-
return _context.abrupt("break",
|
|
12320
|
-
case
|
|
12334
|
+
return _context.abrupt("break", 423);
|
|
12335
|
+
case 240:
|
|
12321
12336
|
_channel10 = args.channel, deletedMessage = args.deletedMessage;
|
|
12322
|
-
|
|
12323
|
-
|
|
12337
|
+
_activeChannelId7 = getActiveChannelId();
|
|
12338
|
+
log.info('channel DELETE_MESSAGE ... ');
|
|
12324
12339
|
_channelExists7 = checkChannelExists(_channel10.id);
|
|
12325
|
-
if (!(_channel10.id ===
|
|
12326
|
-
_context.next =
|
|
12340
|
+
if (!(_channel10.id === _activeChannelId7)) {
|
|
12341
|
+
_context.next = 248;
|
|
12327
12342
|
break;
|
|
12328
12343
|
}
|
|
12329
12344
|
updateMessageOnAllMessages(deletedMessage.id, deletedMessage);
|
|
12330
|
-
_context.next =
|
|
12345
|
+
_context.next = 248;
|
|
12331
12346
|
return effects.put(updateMessageAC(deletedMessage.id, deletedMessage));
|
|
12332
|
-
case
|
|
12347
|
+
case 248:
|
|
12333
12348
|
updateMessageOnMap(_channel10.id, {
|
|
12334
12349
|
messageId: deletedMessage.id,
|
|
12335
12350
|
params: deletedMessage
|
|
12336
12351
|
});
|
|
12337
12352
|
if (!_channelExists7) {
|
|
12338
|
-
_context.next =
|
|
12353
|
+
_context.next = 255;
|
|
12339
12354
|
break;
|
|
12340
12355
|
}
|
|
12341
|
-
_context.next =
|
|
12356
|
+
_context.next = 252;
|
|
12342
12357
|
return effects.put(updateChannelDataAC(_channel10.id, {
|
|
12343
12358
|
newMessageCount: _channel10.newMessageCount,
|
|
12344
12359
|
muted: _channel10.muted,
|
|
12345
12360
|
mutedTill: _channel10.mutedTill
|
|
12346
12361
|
}));
|
|
12347
|
-
case
|
|
12362
|
+
case 252:
|
|
12348
12363
|
if (!(_channel10.lastMessage.id === deletedMessage.id)) {
|
|
12349
|
-
_context.next =
|
|
12364
|
+
_context.next = 255;
|
|
12350
12365
|
break;
|
|
12351
12366
|
}
|
|
12352
|
-
_context.next =
|
|
12367
|
+
_context.next = 255;
|
|
12353
12368
|
return effects.put(updateChannelLastMessageAC(deletedMessage, _channel10));
|
|
12354
|
-
case
|
|
12369
|
+
case 255:
|
|
12355
12370
|
updateChannelOnAllChannels(_channel10.id, {
|
|
12356
12371
|
newMessageCount: _channel10.newMessageCount,
|
|
12357
12372
|
muted: _channel10.muted,
|
|
12358
12373
|
mutedTill: _channel10.mutedTill
|
|
12359
12374
|
}, deletedMessage);
|
|
12360
|
-
return _context.abrupt("break",
|
|
12361
|
-
case
|
|
12375
|
+
return _context.abrupt("break", 423);
|
|
12376
|
+
case 257:
|
|
12362
12377
|
_channel11 = args.channel, _message = args.message;
|
|
12363
|
-
|
|
12364
|
-
|
|
12378
|
+
log.info('channel EDIT_MESSAGE ... ', _message);
|
|
12379
|
+
_activeChannelId8 = getActiveChannelId();
|
|
12365
12380
|
_channelExists8 = checkChannelExists(_channel11.id);
|
|
12366
|
-
if (!(_channel11.id ===
|
|
12367
|
-
_context.next =
|
|
12381
|
+
if (!(_channel11.id === _activeChannelId8)) {
|
|
12382
|
+
_context.next = 265;
|
|
12368
12383
|
break;
|
|
12369
12384
|
}
|
|
12370
|
-
_context.next =
|
|
12385
|
+
_context.next = 264;
|
|
12371
12386
|
return effects.put(updateMessageAC(_message.id, {
|
|
12372
12387
|
body: _message.body,
|
|
12373
12388
|
state: _message.state,
|
|
@@ -12376,7 +12391,7 @@ function watchForEvents() {
|
|
|
12376
12391
|
mentionedUsers: _message.mentionedUsers,
|
|
12377
12392
|
updatedAt: _message.updatedAt
|
|
12378
12393
|
}));
|
|
12379
|
-
case
|
|
12394
|
+
case 264:
|
|
12380
12395
|
updateMessageOnAllMessages(_message.id, {
|
|
12381
12396
|
body: _message.body,
|
|
12382
12397
|
state: _message.state,
|
|
@@ -12385,18 +12400,18 @@ function watchForEvents() {
|
|
|
12385
12400
|
mentionedUsers: _message.mentionedUsers,
|
|
12386
12401
|
updatedAt: _message.updatedAt
|
|
12387
12402
|
});
|
|
12388
|
-
case
|
|
12403
|
+
case 265:
|
|
12389
12404
|
if (!_channelExists8) {
|
|
12390
|
-
_context.next =
|
|
12405
|
+
_context.next = 269;
|
|
12391
12406
|
break;
|
|
12392
12407
|
}
|
|
12393
12408
|
if (!(_channel11.lastMessage.id === _message.id)) {
|
|
12394
|
-
_context.next =
|
|
12409
|
+
_context.next = 269;
|
|
12395
12410
|
break;
|
|
12396
12411
|
}
|
|
12397
|
-
_context.next =
|
|
12412
|
+
_context.next = 269;
|
|
12398
12413
|
return effects.put(updateChannelLastMessageAC(_message, _channel11));
|
|
12399
|
-
case
|
|
12414
|
+
case 269:
|
|
12400
12415
|
if (checkChannelExistsOnMessagesMap(_channel11.id)) {
|
|
12401
12416
|
updateMessageOnMap(_channel11.id, {
|
|
12402
12417
|
messageId: _message.id,
|
|
@@ -12404,36 +12419,36 @@ function watchForEvents() {
|
|
|
12404
12419
|
});
|
|
12405
12420
|
}
|
|
12406
12421
|
updateChannelOnAllChannels(_channel11.id, {}, _message);
|
|
12407
|
-
return _context.abrupt("break",
|
|
12408
|
-
case
|
|
12422
|
+
return _context.abrupt("break", 423);
|
|
12423
|
+
case 272:
|
|
12409
12424
|
_channel12 = args.channel, user = args.user, _message2 = args.message, reaction = args.reaction;
|
|
12410
|
-
|
|
12425
|
+
log.info('channel REACTION_ADDED ... ', args);
|
|
12411
12426
|
isSelf = user.id === SceytChatClient.user.id;
|
|
12412
|
-
|
|
12413
|
-
if (!(_channel12.id ===
|
|
12414
|
-
_context.next =
|
|
12427
|
+
_activeChannelId9 = getActiveChannelId();
|
|
12428
|
+
if (!(_channel12.id === _activeChannelId9)) {
|
|
12429
|
+
_context.next = 280;
|
|
12415
12430
|
break;
|
|
12416
12431
|
}
|
|
12417
|
-
_context.next =
|
|
12432
|
+
_context.next = 279;
|
|
12418
12433
|
return effects.put(addReactionToMessageAC(_message2, reaction, isSelf));
|
|
12419
|
-
case
|
|
12434
|
+
case 279:
|
|
12420
12435
|
addReactionOnAllMessages(_message2, reaction, true);
|
|
12421
|
-
case
|
|
12436
|
+
case 280:
|
|
12422
12437
|
if (!(_message2.user.id === SceytChatClient.user.id)) {
|
|
12423
|
-
_context.next =
|
|
12438
|
+
_context.next = 294;
|
|
12424
12439
|
break;
|
|
12425
12440
|
}
|
|
12426
12441
|
if (!(!isSelf && Notification.permission === 'granted')) {
|
|
12427
|
-
_context.next =
|
|
12442
|
+
_context.next = 289;
|
|
12428
12443
|
break;
|
|
12429
12444
|
}
|
|
12430
|
-
if (!(document.visibilityState !== 'visible' || _channel12.id !==
|
|
12431
|
-
_context.next =
|
|
12445
|
+
if (!(document.visibilityState !== 'visible' || _channel12.id !== _activeChannelId9)) {
|
|
12446
|
+
_context.next = 289;
|
|
12432
12447
|
break;
|
|
12433
12448
|
}
|
|
12434
|
-
_context.next =
|
|
12449
|
+
_context.next = 285;
|
|
12435
12450
|
return effects.select(contactsMapSelector);
|
|
12436
|
-
case
|
|
12451
|
+
case 285:
|
|
12437
12452
|
_contactsMap = _context.sent;
|
|
12438
12453
|
_getFromContacts2 = getShowOnlyContactUsers();
|
|
12439
12454
|
_messageBody = MessageTextFormat({
|
|
@@ -12447,9 +12462,9 @@ function watchForEvents() {
|
|
|
12447
12462
|
setNotification(_messageBody, reaction.user, _channel12, reaction.key, _message2.attachments && _message2.attachments.length ? _message2.attachments.find(function (att) {
|
|
12448
12463
|
return att.type !== attachmentTypes.link;
|
|
12449
12464
|
}) : undefined);
|
|
12450
|
-
case
|
|
12465
|
+
case 289:
|
|
12451
12466
|
if (!(_channel12.newReactions && _channel12.newReactions.length)) {
|
|
12452
|
-
_context.next =
|
|
12467
|
+
_context.next = 293;
|
|
12453
12468
|
break;
|
|
12454
12469
|
}
|
|
12455
12470
|
channelUpdateParams = {
|
|
@@ -12459,9 +12474,9 @@ function watchForEvents() {
|
|
|
12459
12474
|
muted: _channel12.muted,
|
|
12460
12475
|
mutedTill: _channel12.mutedTill
|
|
12461
12476
|
};
|
|
12462
|
-
_context.next =
|
|
12477
|
+
_context.next = 293;
|
|
12463
12478
|
return effects.put(updateChannelDataAC(_channel12.id, channelUpdateParams));
|
|
12464
|
-
case
|
|
12479
|
+
case 293:
|
|
12465
12480
|
updateChannelOnAllChannels(_channel12.id, {
|
|
12466
12481
|
userMessageReactions: _channel12.newReactions,
|
|
12467
12482
|
lastReactedMessage: _message2,
|
|
@@ -12469,77 +12484,77 @@ function watchForEvents() {
|
|
|
12469
12484
|
muted: _channel12.muted,
|
|
12470
12485
|
mutedTill: _channel12.mutedTill
|
|
12471
12486
|
});
|
|
12472
|
-
case
|
|
12487
|
+
case 294:
|
|
12473
12488
|
if (checkChannelExistsOnMessagesMap(_channel12.id)) {
|
|
12474
12489
|
addReactionToMessageOnMap(_channel12.id, _message2, reaction, true);
|
|
12475
12490
|
}
|
|
12476
|
-
return _context.abrupt("break",
|
|
12477
|
-
case
|
|
12491
|
+
return _context.abrupt("break", 423);
|
|
12492
|
+
case 296:
|
|
12478
12493
|
_channel13 = args.channel, _user = args.user, _message3 = args.message, _reaction = args.reaction;
|
|
12479
|
-
|
|
12494
|
+
log.info('channel REACTION_DELETED ... ', _channel13);
|
|
12480
12495
|
channelFromMap = getChannelFromMap(_channel13.id);
|
|
12481
12496
|
_isSelf = _user.id === SceytChatClient.user.id;
|
|
12482
|
-
|
|
12483
|
-
if (!(_channel13.id ===
|
|
12484
|
-
_context.next =
|
|
12497
|
+
_activeChannelId10 = getActiveChannelId();
|
|
12498
|
+
if (!(_channel13.id === _activeChannelId10)) {
|
|
12499
|
+
_context.next = 305;
|
|
12485
12500
|
break;
|
|
12486
12501
|
}
|
|
12487
|
-
_context.next =
|
|
12502
|
+
_context.next = 304;
|
|
12488
12503
|
return effects.put(deleteReactionFromMessageAC(_message3, _reaction, _isSelf));
|
|
12489
|
-
case
|
|
12504
|
+
case 304:
|
|
12490
12505
|
removeReactionOnAllMessages(_message3, _reaction, true);
|
|
12491
|
-
case
|
|
12506
|
+
case 305:
|
|
12492
12507
|
_channelUpdateParams = JSON.parse(JSON.stringify(_channel13));
|
|
12493
12508
|
if (channelFromMap && channelFromMap.lastReactedMessage && channelFromMap.lastReactedMessage.id === _message3.id) {
|
|
12494
12509
|
_channelUpdateParams.lastReactedMessage = null;
|
|
12495
12510
|
}
|
|
12496
|
-
_context.next =
|
|
12511
|
+
_context.next = 309;
|
|
12497
12512
|
return effects.put(updateChannelDataAC(_channel13.id, _channelUpdateParams));
|
|
12498
|
-
case
|
|
12513
|
+
case 309:
|
|
12499
12514
|
updateChannelOnAllChannels(_channel13.id, _channelUpdateParams);
|
|
12500
12515
|
if (checkChannelExistsOnMessagesMap(_channel13.id)) {
|
|
12501
12516
|
removeReactionToMessageOnMap(_channel13.id, _message3, _reaction, true);
|
|
12502
12517
|
}
|
|
12503
|
-
return _context.abrupt("break",
|
|
12504
|
-
case
|
|
12518
|
+
return _context.abrupt("break", 423);
|
|
12519
|
+
case 312:
|
|
12505
12520
|
_channel14 = args.channel;
|
|
12506
12521
|
if (!_channel14) {
|
|
12507
|
-
_context.next =
|
|
12522
|
+
_context.next = 318;
|
|
12508
12523
|
break;
|
|
12509
12524
|
}
|
|
12510
12525
|
_updatedChannel = JSON.parse(JSON.stringify(_channel14));
|
|
12511
|
-
_context.next =
|
|
12526
|
+
_context.next = 317;
|
|
12512
12527
|
return effects.put(updateChannelDataAC(_channel14.id, _updatedChannel));
|
|
12513
|
-
case
|
|
12528
|
+
case 317:
|
|
12514
12529
|
updateChannelOnAllChannels(_channel14.id, _updatedChannel);
|
|
12515
|
-
case
|
|
12516
|
-
return _context.abrupt("break",
|
|
12517
|
-
case
|
|
12530
|
+
case 318:
|
|
12531
|
+
return _context.abrupt("break", 423);
|
|
12532
|
+
case 319:
|
|
12518
12533
|
_channel15 = args.channel;
|
|
12519
|
-
|
|
12520
|
-
_context.next =
|
|
12534
|
+
log.info('CLEAR_HISTORY: ', _channel15);
|
|
12535
|
+
_context.next = 323;
|
|
12521
12536
|
return effects.call(getActiveChannelId);
|
|
12522
|
-
case
|
|
12523
|
-
|
|
12524
|
-
_context.next =
|
|
12537
|
+
case 323:
|
|
12538
|
+
_activeChannelId11 = _context.sent;
|
|
12539
|
+
_context.next = 326;
|
|
12525
12540
|
return effects.call(checkChannelExists, _channel15.id);
|
|
12526
|
-
case
|
|
12541
|
+
case 326:
|
|
12527
12542
|
channelExist = _context.sent;
|
|
12528
|
-
if (!(_channel15.id ===
|
|
12529
|
-
_context.next =
|
|
12543
|
+
if (!(_channel15.id === _activeChannelId11)) {
|
|
12544
|
+
_context.next = 331;
|
|
12530
12545
|
break;
|
|
12531
12546
|
}
|
|
12532
|
-
_context.next =
|
|
12547
|
+
_context.next = 330;
|
|
12533
12548
|
return effects.put(clearMessagesAC());
|
|
12534
|
-
case
|
|
12549
|
+
case 330:
|
|
12535
12550
|
removeAllMessages();
|
|
12536
|
-
case
|
|
12551
|
+
case 331:
|
|
12537
12552
|
removeMessagesFromMap(_channel15.id);
|
|
12538
12553
|
if (!channelExist) {
|
|
12539
|
-
_context.next =
|
|
12554
|
+
_context.next = 335;
|
|
12540
12555
|
break;
|
|
12541
12556
|
}
|
|
12542
|
-
_context.next =
|
|
12557
|
+
_context.next = 335;
|
|
12543
12558
|
return effects.put(updateChannelDataAC(_channel15.id, {
|
|
12544
12559
|
lastMessage: null,
|
|
12545
12560
|
newMessageCount: 0,
|
|
@@ -12547,7 +12562,7 @@ function watchForEvents() {
|
|
|
12547
12562
|
muted: _channel15.muted,
|
|
12548
12563
|
mutedTill: _channel15.mutedTill
|
|
12549
12564
|
}));
|
|
12550
|
-
case
|
|
12565
|
+
case 335:
|
|
12551
12566
|
updateChannelOnAllChannels(_channel15.id, {
|
|
12552
12567
|
lastMessage: null,
|
|
12553
12568
|
newMessageCount: 0,
|
|
@@ -12555,182 +12570,182 @@ function watchForEvents() {
|
|
|
12555
12570
|
muted: _channel15.muted,
|
|
12556
12571
|
mutedTill: _channel15.mutedTill
|
|
12557
12572
|
});
|
|
12558
|
-
return _context.abrupt("break",
|
|
12559
|
-
case
|
|
12573
|
+
return _context.abrupt("break", 423);
|
|
12574
|
+
case 337:
|
|
12560
12575
|
_channel16 = args.channel;
|
|
12561
|
-
|
|
12562
|
-
_context.next =
|
|
12576
|
+
log.info('channel MUTE ... ');
|
|
12577
|
+
_context.next = 341;
|
|
12563
12578
|
return effects.put(updateChannelDataAC(_channel16.id, {
|
|
12564
12579
|
muted: _channel16.muted,
|
|
12565
12580
|
mutedTill: _channel16.mutedTill
|
|
12566
12581
|
}));
|
|
12567
|
-
case
|
|
12582
|
+
case 341:
|
|
12568
12583
|
updateChannelOnAllChannels(_channel16.id, {
|
|
12569
12584
|
muted: _channel16.muted,
|
|
12570
12585
|
mutedTill: _channel16.mutedTill
|
|
12571
12586
|
});
|
|
12572
|
-
return _context.abrupt("break",
|
|
12573
|
-
case
|
|
12587
|
+
return _context.abrupt("break", 423);
|
|
12588
|
+
case 343:
|
|
12574
12589
|
_channel17 = args.channel;
|
|
12575
|
-
|
|
12576
|
-
_context.next =
|
|
12590
|
+
log.info('channel UNMUTE ... ');
|
|
12591
|
+
_context.next = 347;
|
|
12577
12592
|
return effects.put(updateChannelDataAC(_channel17.id, {
|
|
12578
12593
|
muted: _channel17.muted,
|
|
12579
12594
|
mutedTill: _channel17.mutedTill
|
|
12580
12595
|
}));
|
|
12581
|
-
case
|
|
12596
|
+
case 347:
|
|
12582
12597
|
updateChannelOnAllChannels(_channel17.id, {
|
|
12583
12598
|
muted: _channel17.muted,
|
|
12584
12599
|
mutedTill: _channel17.mutedTill
|
|
12585
12600
|
});
|
|
12586
|
-
return _context.abrupt("break",
|
|
12587
|
-
case
|
|
12601
|
+
return _context.abrupt("break", 423);
|
|
12602
|
+
case 349:
|
|
12588
12603
|
_channel18 = args.channel;
|
|
12589
|
-
|
|
12590
|
-
_context.next =
|
|
12604
|
+
log.info('channel PINED ... ');
|
|
12605
|
+
_context.next = 353;
|
|
12591
12606
|
return effects.put(updateChannelDataAC(_channel18.id, {
|
|
12592
12607
|
pinnedAt: _channel18.pinnedAt
|
|
12593
12608
|
}, true));
|
|
12594
|
-
case
|
|
12609
|
+
case 353:
|
|
12595
12610
|
updateChannelOnAllChannels(_channel18.id, {
|
|
12596
12611
|
pinnedAt: _channel18.pinnedAt
|
|
12597
12612
|
});
|
|
12598
|
-
return _context.abrupt("break",
|
|
12599
|
-
case
|
|
12613
|
+
return _context.abrupt("break", 423);
|
|
12614
|
+
case 355:
|
|
12600
12615
|
_channel19 = args.channel;
|
|
12601
|
-
|
|
12602
|
-
_context.next =
|
|
12616
|
+
log.info('channel UNPINED ... ');
|
|
12617
|
+
_context.next = 359;
|
|
12603
12618
|
return effects.put(updateChannelDataAC(_channel19.id, {
|
|
12604
12619
|
pinnedAt: _channel19.pinnedAt
|
|
12605
12620
|
}, false, true));
|
|
12606
|
-
case
|
|
12621
|
+
case 359:
|
|
12607
12622
|
updateChannelOnAllChannels(_channel19.id, {
|
|
12608
12623
|
pinnedAt: _channel19.pinnedAt
|
|
12609
12624
|
});
|
|
12610
|
-
return _context.abrupt("break",
|
|
12611
|
-
case
|
|
12625
|
+
return _context.abrupt("break", 423);
|
|
12626
|
+
case 361:
|
|
12612
12627
|
_channel20 = args.channel;
|
|
12613
|
-
|
|
12614
|
-
_context.next =
|
|
12628
|
+
log.info('channel HIDE ... ');
|
|
12629
|
+
_context.next = 365;
|
|
12615
12630
|
return effects.put(setChannelToHideAC(_channel20));
|
|
12616
|
-
case
|
|
12617
|
-
return _context.abrupt("break",
|
|
12618
|
-
case
|
|
12631
|
+
case 365:
|
|
12632
|
+
return _context.abrupt("break", 423);
|
|
12633
|
+
case 366:
|
|
12619
12634
|
_channel21 = args.channel;
|
|
12620
|
-
|
|
12621
|
-
_context.next =
|
|
12635
|
+
log.info('channel UNHIDE ... ');
|
|
12636
|
+
_context.next = 370;
|
|
12622
12637
|
return effects.put(setChannelToUnHideAC(_channel21));
|
|
12623
|
-
case
|
|
12624
|
-
return _context.abrupt("break",
|
|
12625
|
-
case
|
|
12638
|
+
case 370:
|
|
12639
|
+
return _context.abrupt("break", 423);
|
|
12640
|
+
case 371:
|
|
12626
12641
|
_channel22 = args.channel;
|
|
12627
|
-
_context.next =
|
|
12642
|
+
_context.next = 374;
|
|
12628
12643
|
return effects.put(updateChannelDataAC(_channel22.id, {
|
|
12629
12644
|
unread: _channel22.unread,
|
|
12630
12645
|
muted: _channel22.muted,
|
|
12631
12646
|
mutedTill: _channel22.mutedTill
|
|
12632
12647
|
}));
|
|
12633
|
-
case
|
|
12648
|
+
case 374:
|
|
12634
12649
|
_groupName5 = getChannelGroupName(_channel22);
|
|
12635
|
-
_context.next =
|
|
12650
|
+
_context.next = 377;
|
|
12636
12651
|
return effects.put(updateSearchedChannelDataAC(_channel22.id, {
|
|
12637
12652
|
unread: _channel22.unread
|
|
12638
12653
|
}, _groupName5));
|
|
12639
|
-
case
|
|
12654
|
+
case 377:
|
|
12640
12655
|
updateChannelOnAllChannels(_channel22.id, {
|
|
12641
12656
|
unread: _channel22.unread
|
|
12642
12657
|
});
|
|
12643
|
-
return _context.abrupt("break",
|
|
12644
|
-
case
|
|
12658
|
+
return _context.abrupt("break", 423);
|
|
12659
|
+
case 379:
|
|
12645
12660
|
_channel23 = args.channel;
|
|
12646
|
-
_context.next =
|
|
12661
|
+
_context.next = 382;
|
|
12647
12662
|
return effects.put(updateChannelDataAC(_channel23.id, {
|
|
12648
12663
|
unread: _channel23.unread,
|
|
12649
12664
|
muted: _channel23.muted,
|
|
12650
12665
|
mutedTill: _channel23.mutedTill
|
|
12651
12666
|
}));
|
|
12652
|
-
case
|
|
12667
|
+
case 382:
|
|
12653
12668
|
_groupName6 = getChannelGroupName(_channel23);
|
|
12654
|
-
_context.next =
|
|
12669
|
+
_context.next = 385;
|
|
12655
12670
|
return effects.put(updateSearchedChannelDataAC(_channel23.id, {
|
|
12656
12671
|
unread: _channel23.unread
|
|
12657
12672
|
}, _groupName6));
|
|
12658
|
-
case
|
|
12673
|
+
case 385:
|
|
12659
12674
|
updateChannelOnAllChannels(_channel23.id, {
|
|
12660
12675
|
unread: _channel23.unread
|
|
12661
12676
|
});
|
|
12662
|
-
return _context.abrupt("break",
|
|
12663
|
-
case
|
|
12677
|
+
return _context.abrupt("break", 423);
|
|
12678
|
+
case 387:
|
|
12664
12679
|
_channel24 = args.channel, members = args.members;
|
|
12665
|
-
|
|
12666
|
-
|
|
12667
|
-
_context.next =
|
|
12680
|
+
log.info('channel CHANGE_ROLE channel ... ', _channel24);
|
|
12681
|
+
log.info('channel CHANGE_ROLE member ... ', members);
|
|
12682
|
+
_context.next = 392;
|
|
12668
12683
|
return effects.call(getActiveChannelId);
|
|
12669
|
-
case
|
|
12670
|
-
|
|
12671
|
-
if (!(_channel24.id ===
|
|
12672
|
-
_context.next =
|
|
12684
|
+
case 392:
|
|
12685
|
+
_activeChannelId12 = _context.sent;
|
|
12686
|
+
if (!(_channel24.id === _activeChannelId12)) {
|
|
12687
|
+
_context.next = 396;
|
|
12673
12688
|
break;
|
|
12674
12689
|
}
|
|
12675
|
-
_context.next =
|
|
12690
|
+
_context.next = 396;
|
|
12676
12691
|
return effects.put(updateMembersAC(members));
|
|
12677
|
-
case
|
|
12692
|
+
case 396:
|
|
12678
12693
|
i = 0;
|
|
12679
|
-
case
|
|
12694
|
+
case 397:
|
|
12680
12695
|
if (!(i < members.length)) {
|
|
12681
|
-
_context.next =
|
|
12696
|
+
_context.next = 405;
|
|
12682
12697
|
break;
|
|
12683
12698
|
}
|
|
12684
12699
|
if (!(members[i].id === SceytChatClient.user.id)) {
|
|
12685
|
-
_context.next =
|
|
12700
|
+
_context.next = 402;
|
|
12686
12701
|
break;
|
|
12687
12702
|
}
|
|
12688
|
-
_context.next =
|
|
12703
|
+
_context.next = 401;
|
|
12689
12704
|
return effects.put(updateChannelDataAC(_channel24.id, {
|
|
12690
12705
|
userRole: members[i].role,
|
|
12691
12706
|
muted: _channel24.muted,
|
|
12692
12707
|
mutedTill: _channel24.mutedTill
|
|
12693
12708
|
}));
|
|
12694
|
-
case
|
|
12709
|
+
case 401:
|
|
12695
12710
|
updateChannelOnAllChannels(_channel24.id, {
|
|
12696
12711
|
userRole: members[i].role,
|
|
12697
12712
|
muted: _channel24.muted,
|
|
12698
12713
|
mutedTill: _channel24.mutedTill
|
|
12699
12714
|
});
|
|
12700
|
-
case
|
|
12715
|
+
case 402:
|
|
12701
12716
|
i++;
|
|
12702
|
-
_context.next =
|
|
12717
|
+
_context.next = 397;
|
|
12703
12718
|
break;
|
|
12704
|
-
case
|
|
12705
|
-
return _context.abrupt("break",
|
|
12706
|
-
case
|
|
12719
|
+
case 405:
|
|
12720
|
+
return _context.abrupt("break", 423);
|
|
12721
|
+
case 406:
|
|
12707
12722
|
_channel25 = args.channel;
|
|
12708
|
-
|
|
12709
|
-
return _context.abrupt("break",
|
|
12710
|
-
case
|
|
12723
|
+
log.info('channel frozen channel ... ', _channel25);
|
|
12724
|
+
return _context.abrupt("break", 423);
|
|
12725
|
+
case 409:
|
|
12711
12726
|
_channel26 = args.channel;
|
|
12712
|
-
|
|
12713
|
-
return _context.abrupt("break",
|
|
12714
|
-
case
|
|
12715
|
-
|
|
12716
|
-
return _context.abrupt("break",
|
|
12717
|
-
case
|
|
12727
|
+
log.info('channel unfrozen channel ... ', _channel26);
|
|
12728
|
+
return _context.abrupt("break", 423);
|
|
12729
|
+
case 412:
|
|
12730
|
+
log.info('channel event received >>>... . . . . . ', args);
|
|
12731
|
+
return _context.abrupt("break", 423);
|
|
12732
|
+
case 414:
|
|
12718
12733
|
status = args.status;
|
|
12719
|
-
|
|
12720
|
-
_context.next =
|
|
12734
|
+
log.info('connection status changed . . . . . ', status);
|
|
12735
|
+
_context.next = 418;
|
|
12721
12736
|
return effects.put(setConnectionStatusAC(status));
|
|
12722
|
-
case
|
|
12737
|
+
case 418:
|
|
12723
12738
|
if (!(status === CONNECTION_STATUS.CONNECTED)) {
|
|
12724
|
-
_context.next =
|
|
12739
|
+
_context.next = 421;
|
|
12725
12740
|
break;
|
|
12726
12741
|
}
|
|
12727
|
-
_context.next =
|
|
12742
|
+
_context.next = 421;
|
|
12728
12743
|
return effects.put(getRolesAC());
|
|
12729
|
-
case
|
|
12730
|
-
return _context.abrupt("break",
|
|
12731
|
-
case
|
|
12744
|
+
case 421:
|
|
12745
|
+
return _context.abrupt("break", 423);
|
|
12746
|
+
case 422:
|
|
12732
12747
|
console.warn('UNHANDLED EVENT FROM REDUX-SAGA EVENT-CHANNEL');
|
|
12733
|
-
case
|
|
12748
|
+
case 423:
|
|
12734
12749
|
case "end":
|
|
12735
12750
|
return _context.stop();
|
|
12736
12751
|
}
|
|
@@ -12868,7 +12883,7 @@ function createChannel(action) {
|
|
|
12868
12883
|
fileToUpload = {
|
|
12869
12884
|
data: createChannelData.avatarFile,
|
|
12870
12885
|
progress: function progress(progressPercent) {
|
|
12871
|
-
|
|
12886
|
+
log.info('upload percent - ', progressPercent);
|
|
12872
12887
|
}
|
|
12873
12888
|
};
|
|
12874
12889
|
_context.next = 9;
|
|
@@ -13023,7 +13038,7 @@ function createChannel(action) {
|
|
|
13023
13038
|
case 53:
|
|
13024
13039
|
_context.prev = 53;
|
|
13025
13040
|
_context.t0 = _context["catch"](0);
|
|
13026
|
-
|
|
13041
|
+
log.info(_context.t0, 'Error on create channel');
|
|
13027
13042
|
case 56:
|
|
13028
13043
|
case "end":
|
|
13029
13044
|
return _context.stop();
|
|
@@ -13110,7 +13125,7 @@ function getChannels(action) {
|
|
|
13110
13125
|
channelMessageMap[channel.id] = messages[0];
|
|
13111
13126
|
resolve(true);
|
|
13112
13127
|
})["catch"](function (e) {
|
|
13113
|
-
|
|
13128
|
+
log.info(e, 'Error on getMessagesById');
|
|
13114
13129
|
resolve(true);
|
|
13115
13130
|
});
|
|
13116
13131
|
}));
|
|
@@ -13189,7 +13204,7 @@ function getChannels(action) {
|
|
|
13189
13204
|
case 79:
|
|
13190
13205
|
_context2.prev = 79;
|
|
13191
13206
|
_context2.t1 = _context2["catch"](70);
|
|
13192
|
-
|
|
13207
|
+
log.info(_context2.t1, 'Error on get all channels');
|
|
13193
13208
|
case 82:
|
|
13194
13209
|
i++;
|
|
13195
13210
|
_context2.next = 68;
|
|
@@ -13200,7 +13215,7 @@ function getChannels(action) {
|
|
|
13200
13215
|
case 87:
|
|
13201
13216
|
_context2.prev = 87;
|
|
13202
13217
|
_context2.t2 = _context2["catch"](0);
|
|
13203
|
-
|
|
13218
|
+
log.info(_context2.t2, 'Error on get channels');
|
|
13204
13219
|
case 91:
|
|
13205
13220
|
case "end":
|
|
13206
13221
|
return _context2.stop();
|
|
@@ -13215,7 +13230,7 @@ function searchChannels(action) {
|
|
|
13215
13230
|
_context3.prev = 0;
|
|
13216
13231
|
payload = action.payload;
|
|
13217
13232
|
params = payload.params, contactsMap = payload.contactsMap;
|
|
13218
|
-
|
|
13233
|
+
log.info('search channel payload: ', payload);
|
|
13219
13234
|
SceytChatClient = getClient();
|
|
13220
13235
|
getFromContacts = getShowOnlyContactUsers();
|
|
13221
13236
|
_context3.next = 8;
|
|
@@ -13317,7 +13332,7 @@ function searchChannels(action) {
|
|
|
13317
13332
|
case 44:
|
|
13318
13333
|
_context3.prev = 44;
|
|
13319
13334
|
_context3.t0 = _context3["catch"](0);
|
|
13320
|
-
|
|
13335
|
+
log.info(_context3.t0, 'Error on get channels');
|
|
13321
13336
|
case 48:
|
|
13322
13337
|
case "end":
|
|
13323
13338
|
return _context3.stop();
|
|
@@ -13377,7 +13392,7 @@ function getChannelsForForward() {
|
|
|
13377
13392
|
case 29:
|
|
13378
13393
|
_context4.prev = 29;
|
|
13379
13394
|
_context4.t0 = _context4["catch"](0);
|
|
13380
|
-
|
|
13395
|
+
log.info(_context4.t0, 'Error on get for forward channels');
|
|
13381
13396
|
case 33:
|
|
13382
13397
|
case "end":
|
|
13383
13398
|
return _context4.stop();
|
|
@@ -13493,7 +13508,7 @@ function searchChannelsForForward(action) {
|
|
|
13493
13508
|
case 43:
|
|
13494
13509
|
_context5.prev = 43;
|
|
13495
13510
|
_context5.t0 = _context5["catch"](0);
|
|
13496
|
-
|
|
13511
|
+
log.info(_context5.t0, 'Error on get channels');
|
|
13497
13512
|
case 47:
|
|
13498
13513
|
case "end":
|
|
13499
13514
|
return _context5.stop();
|
|
@@ -13543,7 +13558,7 @@ function channelsLoadMore(action) {
|
|
|
13543
13558
|
channelMessageMap[channel.id] = messages[0];
|
|
13544
13559
|
resolve(true);
|
|
13545
13560
|
})["catch"](function (e) {
|
|
13546
|
-
|
|
13561
|
+
log.info(e, 'Error on getMessagesById');
|
|
13547
13562
|
resolve(true);
|
|
13548
13563
|
});
|
|
13549
13564
|
}));
|
|
@@ -13574,7 +13589,7 @@ function channelsLoadMore(action) {
|
|
|
13574
13589
|
case 28:
|
|
13575
13590
|
_context6.prev = 28;
|
|
13576
13591
|
_context6.t0 = _context6["catch"](0);
|
|
13577
|
-
|
|
13592
|
+
log.info(_context6.t0, 'Error in load more channels');
|
|
13578
13593
|
case 31:
|
|
13579
13594
|
case "end":
|
|
13580
13595
|
return _context6.stop();
|
|
@@ -13625,7 +13640,7 @@ function channelsForForwardLoadMore(action) {
|
|
|
13625
13640
|
case 24:
|
|
13626
13641
|
_context7.prev = 24;
|
|
13627
13642
|
_context7.t0 = _context7["catch"](0);
|
|
13628
|
-
|
|
13643
|
+
log.info(_context7.t0, 'Error in load more channels for forward');
|
|
13629
13644
|
case 27:
|
|
13630
13645
|
case "end":
|
|
13631
13646
|
return _context7.stop();
|
|
@@ -13699,7 +13714,7 @@ function markMessagesRead(action) {
|
|
|
13699
13714
|
case 26:
|
|
13700
13715
|
_context8.prev = 26;
|
|
13701
13716
|
_context8.t0 = _context8["catch"](5);
|
|
13702
|
-
|
|
13717
|
+
log.info(_context8.t0, 'Error on mark messages read');
|
|
13703
13718
|
case 29:
|
|
13704
13719
|
case "end":
|
|
13705
13720
|
return _context8.stop();
|
|
@@ -13728,7 +13743,7 @@ function markMessagesDelivered(action) {
|
|
|
13728
13743
|
_context9.next = 11;
|
|
13729
13744
|
break;
|
|
13730
13745
|
}
|
|
13731
|
-
|
|
13746
|
+
log.info('send delivered marker ', messageIds);
|
|
13732
13747
|
_context9.next = 11;
|
|
13733
13748
|
return effects.call(channel.markMessagesAsReceived, messageIds);
|
|
13734
13749
|
case 11:
|
|
@@ -13737,7 +13752,7 @@ function markMessagesDelivered(action) {
|
|
|
13737
13752
|
case 13:
|
|
13738
13753
|
_context9.prev = 13;
|
|
13739
13754
|
_context9.t0 = _context9["catch"](2);
|
|
13740
|
-
|
|
13755
|
+
log.info(_context9.t0, 'Error on mark messages delivered');
|
|
13741
13756
|
case 16:
|
|
13742
13757
|
case "end":
|
|
13743
13758
|
return _context9.stop();
|
|
@@ -13819,7 +13834,7 @@ function switchChannel(action) {
|
|
|
13819
13834
|
case 44:
|
|
13820
13835
|
_context10.prev = 44;
|
|
13821
13836
|
_context10.t0 = _context10["catch"](0);
|
|
13822
|
-
|
|
13837
|
+
log.info('error in switch channel');
|
|
13823
13838
|
case 47:
|
|
13824
13839
|
case "end":
|
|
13825
13840
|
return _context10.stop();
|
|
@@ -13860,7 +13875,7 @@ function notificationsTurnOff(action) {
|
|
|
13860
13875
|
case 16:
|
|
13861
13876
|
_context11.prev = 16;
|
|
13862
13877
|
_context11.t0 = _context11["catch"](7);
|
|
13863
|
-
|
|
13878
|
+
log.info('ERROR turn off notifications', _context11.t0.message);
|
|
13864
13879
|
case 19:
|
|
13865
13880
|
case "end":
|
|
13866
13881
|
return _context11.stop();
|
|
@@ -13900,7 +13915,7 @@ function notificationsTurnOn() {
|
|
|
13900
13915
|
case 15:
|
|
13901
13916
|
_context12.prev = 15;
|
|
13902
13917
|
_context12.t0 = _context12["catch"](6);
|
|
13903
|
-
|
|
13918
|
+
log.info('ERROR turn on notifications: ', _context12.t0.message);
|
|
13904
13919
|
case 18:
|
|
13905
13920
|
case "end":
|
|
13906
13921
|
return _context12.stop();
|
|
@@ -13938,7 +13953,7 @@ function markChannelAsRead(action) {
|
|
|
13938
13953
|
case 14:
|
|
13939
13954
|
_context13.prev = 14;
|
|
13940
13955
|
_context13.t0 = _context13["catch"](0);
|
|
13941
|
-
|
|
13956
|
+
log.info(_context13.t0, 'Error in set channel unread');
|
|
13942
13957
|
case 17:
|
|
13943
13958
|
case "end":
|
|
13944
13959
|
return _context13.stop();
|
|
@@ -13975,7 +13990,7 @@ function markChannelAsUnRead(action) {
|
|
|
13975
13990
|
case 13:
|
|
13976
13991
|
_context14.prev = 13;
|
|
13977
13992
|
_context14.t0 = _context14["catch"](0);
|
|
13978
|
-
|
|
13993
|
+
log.info(_context14.t0, 'Error in set channel unread');
|
|
13979
13994
|
case 16:
|
|
13980
13995
|
case "end":
|
|
13981
13996
|
return _context14.stop();
|
|
@@ -14013,7 +14028,7 @@ function pinChannel(action) {
|
|
|
14013
14028
|
case 14:
|
|
14014
14029
|
_context15.prev = 14;
|
|
14015
14030
|
_context15.t0 = _context15["catch"](0);
|
|
14016
|
-
|
|
14031
|
+
log.info(_context15.t0, 'Error in pinChannel');
|
|
14017
14032
|
case 17:
|
|
14018
14033
|
case "end":
|
|
14019
14034
|
return _context15.stop();
|
|
@@ -14051,7 +14066,7 @@ function unpinChannel(action) {
|
|
|
14051
14066
|
case 14:
|
|
14052
14067
|
_context16.prev = 14;
|
|
14053
14068
|
_context16.t0 = _context16["catch"](0);
|
|
14054
|
-
|
|
14069
|
+
log.info(_context16.t0, 'Error in unpinChannel');
|
|
14055
14070
|
case 17:
|
|
14056
14071
|
case "end":
|
|
14057
14072
|
return _context16.stop();
|
|
@@ -14117,11 +14132,11 @@ function leaveChannel(action) {
|
|
|
14117
14132
|
messageBuilder = channel.createMessageBuilder();
|
|
14118
14133
|
messageBuilder.setBody('LG').setType('system').setDisplayCount(0).setSilent(true);
|
|
14119
14134
|
messageToSend = messageBuilder.create();
|
|
14120
|
-
|
|
14135
|
+
log.info('send message for left');
|
|
14121
14136
|
_context18.next = 16;
|
|
14122
14137
|
return effects.call(channel.sendMessage, messageToSend);
|
|
14123
14138
|
case 16:
|
|
14124
|
-
|
|
14139
|
+
log.info('leave');
|
|
14125
14140
|
_context18.next = 19;
|
|
14126
14141
|
return effects.call(channel.leave);
|
|
14127
14142
|
case 19:
|
|
@@ -14137,7 +14152,7 @@ function leaveChannel(action) {
|
|
|
14137
14152
|
case 26:
|
|
14138
14153
|
_context18.prev = 26;
|
|
14139
14154
|
_context18.t0 = _context18["catch"](0);
|
|
14140
|
-
|
|
14155
|
+
log.info('ERROR in leave channel - ', _context18.t0.message);
|
|
14141
14156
|
case 29:
|
|
14142
14157
|
case "end":
|
|
14143
14158
|
return _context18.stop();
|
|
@@ -14180,7 +14195,7 @@ function deleteChannel(action) {
|
|
|
14180
14195
|
case 18:
|
|
14181
14196
|
_context19.prev = 18;
|
|
14182
14197
|
_context19.t0 = _context19["catch"](0);
|
|
14183
|
-
|
|
14198
|
+
log.info('ERROR in delete channel');
|
|
14184
14199
|
case 21:
|
|
14185
14200
|
case "end":
|
|
14186
14201
|
return _context19.stop();
|
|
@@ -14220,7 +14235,7 @@ function blockChannel(action) {
|
|
|
14220
14235
|
case 16:
|
|
14221
14236
|
_context20.prev = 16;
|
|
14222
14237
|
_context20.t0 = _context20["catch"](0);
|
|
14223
|
-
|
|
14238
|
+
log.info('ERROR in block channel - ', _context20.t0.message);
|
|
14224
14239
|
case 19:
|
|
14225
14240
|
case "end":
|
|
14226
14241
|
return _context20.stop();
|
|
@@ -14256,7 +14271,7 @@ function updateChannel(action) {
|
|
|
14256
14271
|
fileToUpload = {
|
|
14257
14272
|
data: config.avatar,
|
|
14258
14273
|
progress: function progress(progressPercent) {
|
|
14259
|
-
|
|
14274
|
+
log.info('upload percent - ', progressPercent);
|
|
14260
14275
|
}
|
|
14261
14276
|
};
|
|
14262
14277
|
_context21.next = 13;
|
|
@@ -14297,7 +14312,7 @@ function updateChannel(action) {
|
|
|
14297
14312
|
case 28:
|
|
14298
14313
|
_context21.prev = 28;
|
|
14299
14314
|
_context21.t0 = _context21["catch"](0);
|
|
14300
|
-
|
|
14315
|
+
log.info('ERROR in update channel', _context21.t0.message);
|
|
14301
14316
|
case 31:
|
|
14302
14317
|
case "end":
|
|
14303
14318
|
return _context21.stop();
|
|
@@ -14344,7 +14359,7 @@ function checkUsersStatus() {
|
|
|
14344
14359
|
case 19:
|
|
14345
14360
|
_context22.prev = 19;
|
|
14346
14361
|
_context22.t0 = _context22["catch"](0);
|
|
14347
|
-
|
|
14362
|
+
log.info('ERROR in check user status : ', _context22.t0.message);
|
|
14348
14363
|
case 22:
|
|
14349
14364
|
case "end":
|
|
14350
14365
|
return _context22.stop();
|
|
@@ -14388,7 +14403,7 @@ function sendTyping(action) {
|
|
|
14388
14403
|
case 18:
|
|
14389
14404
|
_context23.prev = 18;
|
|
14390
14405
|
_context23.t0 = _context23["catch"](7);
|
|
14391
|
-
|
|
14406
|
+
log.info('ERROR in send typing', _context23.t0);
|
|
14392
14407
|
case 21:
|
|
14393
14408
|
case "end":
|
|
14394
14409
|
return _context23.stop();
|
|
@@ -14456,7 +14471,7 @@ function clearHistory(action) {
|
|
|
14456
14471
|
case 27:
|
|
14457
14472
|
_context24.prev = 27;
|
|
14458
14473
|
_context24.t0 = _context24["catch"](0);
|
|
14459
|
-
|
|
14474
|
+
log.info('ERROR in clear history');
|
|
14460
14475
|
case 30:
|
|
14461
14476
|
case "end":
|
|
14462
14477
|
return _context24.stop();
|
|
@@ -14527,7 +14542,7 @@ function deleteAllMessages(action) {
|
|
|
14527
14542
|
case 28:
|
|
14528
14543
|
_context25.prev = 28;
|
|
14529
14544
|
_context25.t0 = _context25["catch"](0);
|
|
14530
|
-
|
|
14545
|
+
log.info('ERROR in clear history');
|
|
14531
14546
|
case 31:
|
|
14532
14547
|
case "end":
|
|
14533
14548
|
return _context25.stop();
|
|
@@ -14581,7 +14596,7 @@ function joinChannel(action) {
|
|
|
14581
14596
|
case 26:
|
|
14582
14597
|
_context26.prev = 26;
|
|
14583
14598
|
_context26.t0 = _context26["catch"](0);
|
|
14584
|
-
|
|
14599
|
+
log.info(_context26.t0, 'Error in join to channel');
|
|
14585
14600
|
case 29:
|
|
14586
14601
|
case "end":
|
|
14587
14602
|
return _context26.stop();
|
|
@@ -14916,7 +14931,7 @@ function resizeImage(file, maxWidth, maxHeight, quality) {
|
|
|
14916
14931
|
img.src = blobURL;
|
|
14917
14932
|
img.onerror = function () {
|
|
14918
14933
|
URL.revokeObjectURL(this.src);
|
|
14919
|
-
|
|
14934
|
+
log.info('Cannot load image');
|
|
14920
14935
|
};
|
|
14921
14936
|
img.onload = function () {
|
|
14922
14937
|
URL.revokeObjectURL(this.src);
|
|
@@ -14964,7 +14979,7 @@ function createImageThumbnail(file, path, maxWidth, maxHeight) {
|
|
|
14964
14979
|
img.src = blobURL || path || '';
|
|
14965
14980
|
img.onerror = function () {
|
|
14966
14981
|
URL.revokeObjectURL(this.src);
|
|
14967
|
-
|
|
14982
|
+
log.info('Cannot load image');
|
|
14968
14983
|
};
|
|
14969
14984
|
img.onload = function () {
|
|
14970
14985
|
if (blobURL) {
|
|
@@ -15019,7 +15034,7 @@ function calculateSize(width, height, maxWidth, maxHeight) {
|
|
|
15019
15034
|
var currentVersion = 1;
|
|
15020
15035
|
var _setDataToDB = function setDataToDB(dbName, storeName, data, keyPath) {
|
|
15021
15036
|
if (!('indexedDB' in window)) {
|
|
15022
|
-
|
|
15037
|
+
log.info("This browser doesn't support IndexedDB");
|
|
15023
15038
|
} else {
|
|
15024
15039
|
var openRequest = indexedDB.open(dbName, currentVersion);
|
|
15025
15040
|
openRequest.onupgradeneeded = function () {
|
|
@@ -15082,7 +15097,7 @@ var _getDataFromDB = function getDataFromDB(dbName, storeName, keyPath, keyPatNa
|
|
|
15082
15097
|
db.close();
|
|
15083
15098
|
resolve(result);
|
|
15084
15099
|
} else {
|
|
15085
|
-
|
|
15100
|
+
log.info('No data found for the specified keyPathValue.');
|
|
15086
15101
|
db.close();
|
|
15087
15102
|
resolve('');
|
|
15088
15103
|
}
|
|
@@ -15109,7 +15124,7 @@ var addData = function addData(db, storeName, keyPath, data) {
|
|
|
15109
15124
|
var request = channelObjectStore.put(value);
|
|
15110
15125
|
request.onsuccess = function () {};
|
|
15111
15126
|
request.onerror = function () {
|
|
15112
|
-
|
|
15127
|
+
log.info('Error on put channel to db .. ', request.error);
|
|
15113
15128
|
};
|
|
15114
15129
|
});
|
|
15115
15130
|
};
|
|
@@ -15119,10 +15134,10 @@ var addData = function addData(db, storeName, keyPath, data) {
|
|
|
15119
15134
|
data.forEach(function (value) {
|
|
15120
15135
|
var request = store.put(value);
|
|
15121
15136
|
request.onsuccess = function () {
|
|
15122
|
-
|
|
15137
|
+
log.info('data added to db.. ', request.result);
|
|
15123
15138
|
};
|
|
15124
15139
|
request.onerror = function () {
|
|
15125
|
-
|
|
15140
|
+
log.info('Error on put channel to db .. ', request.error);
|
|
15126
15141
|
};
|
|
15127
15142
|
});
|
|
15128
15143
|
}
|
|
@@ -15380,7 +15395,7 @@ function sendMessage(action) {
|
|
|
15380
15395
|
};
|
|
15381
15396
|
messageAttachment.completion = function (updatedAttachment, error) {
|
|
15382
15397
|
if (error) {
|
|
15383
|
-
|
|
15398
|
+
log.info('fail to upload attachment ... ', error);
|
|
15384
15399
|
store.dispatch({
|
|
15385
15400
|
type: UPLOAD_ATTACHMENT_COMPILATION,
|
|
15386
15401
|
payload: {
|
|
@@ -15608,7 +15623,7 @@ function sendMessage(action) {
|
|
|
15608
15623
|
});
|
|
15609
15624
|
attachmentsToUpdate = messageResponse.attachments.map(function (attachment) {
|
|
15610
15625
|
if (currentAttachmentsMap[attachment.tid]) {
|
|
15611
|
-
|
|
15626
|
+
log.info('set at');
|
|
15612
15627
|
return _extends({}, attachment, {
|
|
15613
15628
|
attachmentUrl: currentAttachmentsMap[attachment.tid].attachmentUrl
|
|
15614
15629
|
});
|
|
@@ -15666,7 +15681,7 @@ function sendMessage(action) {
|
|
|
15666
15681
|
case 49:
|
|
15667
15682
|
_context2.prev = 49;
|
|
15668
15683
|
_context2.t0 = _context2["catch"](2);
|
|
15669
|
-
|
|
15684
|
+
log.info('Error on uploading attachment', message.tid, _context2.t0);
|
|
15670
15685
|
_context2.next = 54;
|
|
15671
15686
|
return effects.put(updateAttachmentUploadingStateAC(UPLOAD_STATE.FAIL, message.tid));
|
|
15672
15687
|
case 54:
|
|
@@ -15706,7 +15721,7 @@ function sendMessage(action) {
|
|
|
15706
15721
|
case 80:
|
|
15707
15722
|
_context3.prev = 80;
|
|
15708
15723
|
_context3.t2 = _context3["catch"](2);
|
|
15709
|
-
|
|
15724
|
+
log.info('error on send message ... ', _context3.t2);
|
|
15710
15725
|
case 83:
|
|
15711
15726
|
case "end":
|
|
15712
15727
|
return _context3.stop();
|
|
@@ -15888,7 +15903,7 @@ function sendTextMessage(action) {
|
|
|
15888
15903
|
case 82:
|
|
15889
15904
|
_context4.prev = 82;
|
|
15890
15905
|
_context4.t0 = _context4["catch"](8);
|
|
15891
|
-
|
|
15906
|
+
log.info('error on send text message ... ', _context4.t0);
|
|
15892
15907
|
updateMessageOnMap(channel.id, {
|
|
15893
15908
|
messageId: sendMessageTid,
|
|
15894
15909
|
params: {
|
|
@@ -16083,7 +16098,7 @@ function forwardMessage(action) {
|
|
|
16083
16098
|
case 73:
|
|
16084
16099
|
_context5.prev = 73;
|
|
16085
16100
|
_context5.t0 = _context5["catch"](0);
|
|
16086
|
-
|
|
16101
|
+
log.info('error on forward message ... ', _context5.t0);
|
|
16087
16102
|
case 76:
|
|
16088
16103
|
_context5.next = 78;
|
|
16089
16104
|
return effects.put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
@@ -16108,7 +16123,7 @@ function resendMessage(action) {
|
|
|
16108
16123
|
case 6:
|
|
16109
16124
|
channel = _context6.sent;
|
|
16110
16125
|
_context6.prev = 7;
|
|
16111
|
-
|
|
16126
|
+
log.info('resend message .... ', message);
|
|
16112
16127
|
if (!channel) {
|
|
16113
16128
|
channel = getChannelFromAllChannels(channelId);
|
|
16114
16129
|
if (channel) {
|
|
@@ -16145,7 +16160,7 @@ function resendMessage(action) {
|
|
|
16145
16160
|
messageCopy = _extends({}, message, {
|
|
16146
16161
|
attachments: [messageAttachment]
|
|
16147
16162
|
});
|
|
16148
|
-
|
|
16163
|
+
log.info('attachmentCompilation. .. . .', attachmentCompilation);
|
|
16149
16164
|
if (!(connectionState === CONNECTION_STATUS.CONNECTED && attachmentCompilation[messageAttachment.tid] && attachmentCompilation[messageAttachment.tid] === UPLOAD_STATE.FAIL)) {
|
|
16150
16165
|
_context6.next = 94;
|
|
16151
16166
|
break;
|
|
@@ -16160,7 +16175,7 @@ function resendMessage(action) {
|
|
|
16160
16175
|
handleUploadProgress = function handleUploadProgress(_ref2) {
|
|
16161
16176
|
var loaded = _ref2.loaded,
|
|
16162
16177
|
total = _ref2.total;
|
|
16163
|
-
|
|
16178
|
+
log.info('progress ... ', loaded / total);
|
|
16164
16179
|
};
|
|
16165
16180
|
_context6.prev = 29;
|
|
16166
16181
|
handleUpdateLocalPath = function handleUpdateLocalPath(updatedLink) {
|
|
@@ -16182,7 +16197,7 @@ function resendMessage(action) {
|
|
|
16182
16197
|
});
|
|
16183
16198
|
};
|
|
16184
16199
|
pendingAttachment = getPendingAttachment(message.attachments[0].tid);
|
|
16185
|
-
|
|
16200
|
+
log.info('pendingAttachment ... ', pendingAttachment);
|
|
16186
16201
|
if (!messageAttachment.cachedUrl) {
|
|
16187
16202
|
_context6.next = 37;
|
|
16188
16203
|
break;
|
|
@@ -16198,14 +16213,14 @@ function resendMessage(action) {
|
|
|
16198
16213
|
case 41:
|
|
16199
16214
|
uri = _context6.sent;
|
|
16200
16215
|
case 42:
|
|
16201
|
-
|
|
16216
|
+
log.info('messageAttachment ... ', messageAttachment);
|
|
16202
16217
|
_context6.next = 45;
|
|
16203
16218
|
return effects.put(updateAttachmentUploadingStateAC(UPLOAD_STATE.SUCCESS, messageAttachment.tid));
|
|
16204
16219
|
case 45:
|
|
16205
16220
|
delete messageCopy.createdAt;
|
|
16206
16221
|
_thumbnailMetas = {};
|
|
16207
16222
|
fileSize = messageAttachment.cachedUrl ? messageAttachment.size : pendingAttachment.file.size;
|
|
16208
|
-
|
|
16223
|
+
log.info('uri ... ', uri);
|
|
16209
16224
|
if (!(!messageAttachment.cachedUrl && messageAttachment.url.type.split('/')[0] === 'image')) {
|
|
16210
16225
|
_context6.next = 56;
|
|
16211
16226
|
break;
|
|
@@ -16228,10 +16243,10 @@ function resendMessage(action) {
|
|
|
16228
16243
|
szh: _thumbnailMetas.imageHeight
|
|
16229
16244
|
}));
|
|
16230
16245
|
}
|
|
16231
|
-
|
|
16246
|
+
log.info('attachmentMeta ... ', attachmentMeta);
|
|
16232
16247
|
attachmentBuilder = channel.createAttachmentBuilder(uri, messageAttachment.type);
|
|
16233
16248
|
attachmentToSend = attachmentBuilder.setName(messageAttachment.name).setMetadata(attachmentMeta).setFileSize(fileSize).setUpload(false).create();
|
|
16234
|
-
|
|
16249
|
+
log.info('attachmentToSend ... ', attachmentToSend);
|
|
16235
16250
|
attachmentToSend.tid = messageAttachment.tid;
|
|
16236
16251
|
attachmentToSend.attachmentUrl = messageAttachment.attachmentUrl;
|
|
16237
16252
|
_context6.next = 65;
|
|
@@ -16292,7 +16307,7 @@ function resendMessage(action) {
|
|
|
16292
16307
|
case 85:
|
|
16293
16308
|
_context6.prev = 85;
|
|
16294
16309
|
_context6.t0 = _context6["catch"](29);
|
|
16295
|
-
|
|
16310
|
+
log.info('fail upload attachment on resend message ... ', _context6.t0);
|
|
16296
16311
|
_context6.next = 90;
|
|
16297
16312
|
return effects.put(updateAttachmentUploadingStateAC(UPLOAD_STATE.FAIL, messageAttachment.tid));
|
|
16298
16313
|
case 90:
|
|
@@ -16317,7 +16332,7 @@ function resendMessage(action) {
|
|
|
16317
16332
|
_context6.next = 121;
|
|
16318
16333
|
break;
|
|
16319
16334
|
}
|
|
16320
|
-
|
|
16335
|
+
log.info('send failed message ...');
|
|
16321
16336
|
_messageCopy3 = _extends({}, message);
|
|
16322
16337
|
delete _messageCopy3.createdAt;
|
|
16323
16338
|
if (!(connectionState === CONNECTION_STATUS.CONNECTED)) {
|
|
@@ -16328,7 +16343,7 @@ function resendMessage(action) {
|
|
|
16328
16343
|
return effects.call(channel.sendMessage, _messageCopy3);
|
|
16329
16344
|
case 103:
|
|
16330
16345
|
_messageResponse = _context6.sent;
|
|
16331
|
-
|
|
16346
|
+
log.info('resend message response ... ', _messageResponse);
|
|
16332
16347
|
_messageUpdateData = {
|
|
16333
16348
|
id: _messageResponse.id,
|
|
16334
16349
|
body: _messageResponse.body,
|
|
@@ -16382,7 +16397,7 @@ function resendMessage(action) {
|
|
|
16382
16397
|
case 125:
|
|
16383
16398
|
_context6.prev = 125;
|
|
16384
16399
|
_context6.t1 = _context6["catch"](7);
|
|
16385
|
-
|
|
16400
|
+
log.info('ERROR in resend message', _context6.t1.message, 'channel.. . ', channel);
|
|
16386
16401
|
_context6.next = 130;
|
|
16387
16402
|
return effects.put(updateMessageAC(message.tid, {
|
|
16388
16403
|
state: MESSAGE_STATUS.FAILED
|
|
@@ -16428,7 +16443,7 @@ function deleteMessage(action) {
|
|
|
16428
16443
|
return effects.call(channel.deleteMessageById, messageId, deleteOption === 'forMe');
|
|
16429
16444
|
case 9:
|
|
16430
16445
|
deletedMessage = _context7.sent;
|
|
16431
|
-
|
|
16446
|
+
log.info('deletedMessage . .. . .', deletedMessage);
|
|
16432
16447
|
_context7.next = 13;
|
|
16433
16448
|
return effects.put(updateMessageAC(deletedMessage.id, deletedMessage));
|
|
16434
16449
|
case 13:
|
|
@@ -16451,7 +16466,7 @@ function deleteMessage(action) {
|
|
|
16451
16466
|
case 22:
|
|
16452
16467
|
_context7.prev = 22;
|
|
16453
16468
|
_context7.t0 = _context7["catch"](0);
|
|
16454
|
-
|
|
16469
|
+
log.info('ERROR in delete message', _context7.t0.message);
|
|
16455
16470
|
case 25:
|
|
16456
16471
|
case "end":
|
|
16457
16472
|
return _context7.stop();
|
|
@@ -16509,7 +16524,7 @@ function editMessage(action) {
|
|
|
16509
16524
|
case 21:
|
|
16510
16525
|
_context8.prev = 21;
|
|
16511
16526
|
_context8.t0 = _context8["catch"](0);
|
|
16512
|
-
|
|
16527
|
+
log.info('ERROR in edit message', _context8.t0.message);
|
|
16513
16528
|
case 24:
|
|
16514
16529
|
case "end":
|
|
16515
16530
|
return _context8.stop();
|
|
@@ -16623,7 +16638,7 @@ function getMessagesQuery(action) {
|
|
|
16623
16638
|
break;
|
|
16624
16639
|
case 63:
|
|
16625
16640
|
messageQuery.limit = MESSAGES_MAX_LENGTH;
|
|
16626
|
-
|
|
16641
|
+
log.info('load by message id from server ...............', messageId);
|
|
16627
16642
|
_context9.next = 67;
|
|
16628
16643
|
return effects.call(messageQuery.loadNearMessageId, messageId);
|
|
16629
16644
|
case 67:
|
|
@@ -16646,7 +16661,7 @@ function getMessagesQuery(action) {
|
|
|
16646
16661
|
result.hasNext = _secondResult.hasNext;
|
|
16647
16662
|
messageQuery.reverse = true;
|
|
16648
16663
|
case 80:
|
|
16649
|
-
|
|
16664
|
+
log.info('result from server ....... ', result);
|
|
16650
16665
|
_context9.next = 83;
|
|
16651
16666
|
return effects.put(setMessagesHasNextAC(true));
|
|
16652
16667
|
case 83:
|
|
@@ -16768,7 +16783,7 @@ function getMessagesQuery(action) {
|
|
|
16768
16783
|
_context9.next = 145;
|
|
16769
16784
|
return effects.put(setMessagesAC(JSON.parse(JSON.stringify(cachedMessages))));
|
|
16770
16785
|
case 145:
|
|
16771
|
-
|
|
16786
|
+
log.info('load message from server');
|
|
16772
16787
|
_context9.next = 148;
|
|
16773
16788
|
return effects.call(messageQuery.loadPrevious);
|
|
16774
16789
|
case 148:
|
|
@@ -16838,7 +16853,7 @@ function getMessagesQuery(action) {
|
|
|
16838
16853
|
case 177:
|
|
16839
16854
|
_context9.prev = 177;
|
|
16840
16855
|
_context9.t0 = _context9["catch"](0);
|
|
16841
|
-
|
|
16856
|
+
log.info('error in message query', _context9.t0);
|
|
16842
16857
|
case 180:
|
|
16843
16858
|
case "end":
|
|
16844
16859
|
return _context9.stop();
|
|
@@ -16853,7 +16868,7 @@ function loadMoreMessages(action) {
|
|
|
16853
16868
|
_context10.prev = 0;
|
|
16854
16869
|
payload = action.payload;
|
|
16855
16870
|
limit = payload.limit, direction = payload.direction, channelId = payload.channelId, messageId = payload.messageId, hasNext = payload.hasNext;
|
|
16856
|
-
|
|
16871
|
+
log.info('loadMoreMessages .. .. ', payload);
|
|
16857
16872
|
SceytChatClient = getClient();
|
|
16858
16873
|
messageQueryBuilder = new SceytChatClient.MessageListQueryBuilder(channelId);
|
|
16859
16874
|
messageQueryBuilder.reverse(true);
|
|
@@ -16910,13 +16925,13 @@ function loadMoreMessages(action) {
|
|
|
16910
16925
|
_context10.next = 42;
|
|
16911
16926
|
break;
|
|
16912
16927
|
}
|
|
16913
|
-
|
|
16928
|
+
log.info('saga load next from server ... ', messageId);
|
|
16914
16929
|
messageQuery.reverse = false;
|
|
16915
16930
|
_context10.next = 37;
|
|
16916
16931
|
return effects.call(messageQuery.loadNextMessageId, messageId);
|
|
16917
16932
|
case 37:
|
|
16918
16933
|
result = _context10.sent;
|
|
16919
|
-
|
|
16934
|
+
log.info('result from server next ... ', result);
|
|
16920
16935
|
if (result.messages.length) {
|
|
16921
16936
|
addAllMessages(result.messages, MESSAGE_LOAD_DIRECTION.NEXT);
|
|
16922
16937
|
}
|
|
@@ -16947,7 +16962,7 @@ function loadMoreMessages(action) {
|
|
|
16947
16962
|
case 55:
|
|
16948
16963
|
_context10.prev = 55;
|
|
16949
16964
|
_context10.t0 = _context10["catch"](0);
|
|
16950
|
-
|
|
16965
|
+
log.info('error in load more messages', _context10.t0);
|
|
16951
16966
|
case 58:
|
|
16952
16967
|
case "end":
|
|
16953
16968
|
return _context10.stop();
|
|
@@ -17009,7 +17024,7 @@ function addReaction(action) {
|
|
|
17009
17024
|
case 28:
|
|
17010
17025
|
_context11.prev = 28;
|
|
17011
17026
|
_context11.t0 = _context11["catch"](0);
|
|
17012
|
-
|
|
17027
|
+
log.info('ERROR in add reaction', _context11.t0.message);
|
|
17013
17028
|
case 31:
|
|
17014
17029
|
case "end":
|
|
17015
17030
|
return _context11.stop();
|
|
@@ -17053,7 +17068,7 @@ function deleteReaction(action) {
|
|
|
17053
17068
|
case 16:
|
|
17054
17069
|
updateChannelOnAllChannels(channel.id, channelUpdateParam);
|
|
17055
17070
|
case 17:
|
|
17056
|
-
|
|
17071
|
+
log.info('message received. ... ', message);
|
|
17057
17072
|
_context12.next = 20;
|
|
17058
17073
|
return effects.put(deleteReactionFromListAC(reaction));
|
|
17059
17074
|
case 20:
|
|
@@ -17067,7 +17082,7 @@ function deleteReaction(action) {
|
|
|
17067
17082
|
case 26:
|
|
17068
17083
|
_context12.prev = 26;
|
|
17069
17084
|
_context12.t0 = _context12["catch"](0);
|
|
17070
|
-
|
|
17085
|
+
log.info('ERROR in delete reaction', _context12.t0.message);
|
|
17071
17086
|
case 29:
|
|
17072
17087
|
case "end":
|
|
17073
17088
|
return _context12.stop();
|
|
@@ -17111,7 +17126,7 @@ function getReactions(action) {
|
|
|
17111
17126
|
case 22:
|
|
17112
17127
|
_context13.prev = 22;
|
|
17113
17128
|
_context13.t0 = _context13["catch"](0);
|
|
17114
|
-
|
|
17129
|
+
log.info('ERROR in get reactions', _context13.t0.message);
|
|
17115
17130
|
case 25:
|
|
17116
17131
|
case "end":
|
|
17117
17132
|
return _context13.stop();
|
|
@@ -17148,7 +17163,7 @@ function loadMoreReactions(action) {
|
|
|
17148
17163
|
case 16:
|
|
17149
17164
|
_context14.prev = 16;
|
|
17150
17165
|
_context14.t0 = _context14["catch"](0);
|
|
17151
|
-
|
|
17166
|
+
log.info('ERROR in load more reactions', _context14.t0.message);
|
|
17152
17167
|
case 19:
|
|
17153
17168
|
case "end":
|
|
17154
17169
|
return _context14.stop();
|
|
@@ -17235,7 +17250,7 @@ function getMessageAttachments(action) {
|
|
|
17235
17250
|
case 41:
|
|
17236
17251
|
_context15.prev = 41;
|
|
17237
17252
|
_context15.t0 = _context15["catch"](0);
|
|
17238
|
-
|
|
17253
|
+
log.info('error in message attachment query');
|
|
17239
17254
|
case 44:
|
|
17240
17255
|
case "end":
|
|
17241
17256
|
return _context15.stop();
|
|
@@ -17288,7 +17303,7 @@ function loadMoreMessageAttachments(action) {
|
|
|
17288
17303
|
case 24:
|
|
17289
17304
|
_context16.prev = 24;
|
|
17290
17305
|
_context16.t0 = _context16["catch"](0);
|
|
17291
|
-
|
|
17306
|
+
log.info('error in message attachment query', _context16.t0);
|
|
17292
17307
|
case 28:
|
|
17293
17308
|
case "end":
|
|
17294
17309
|
return _context16.stop();
|
|
@@ -17319,7 +17334,7 @@ function pauseAttachmentUploading(action) {
|
|
|
17319
17334
|
case 9:
|
|
17320
17335
|
_context17.prev = 9;
|
|
17321
17336
|
_context17.t0 = _context17["catch"](0);
|
|
17322
|
-
|
|
17337
|
+
log.info('error in pause attachment uploading', _context17.t0);
|
|
17323
17338
|
case 13:
|
|
17324
17339
|
case "end":
|
|
17325
17340
|
return _context17.stop();
|
|
@@ -17333,7 +17348,7 @@ function resumeAttachmentUploading(action) {
|
|
|
17333
17348
|
case 0:
|
|
17334
17349
|
_context18.prev = 0;
|
|
17335
17350
|
attachmentId = action.payload.attachmentId;
|
|
17336
|
-
|
|
17351
|
+
log.info('resume for attachment ... ', attachmentId);
|
|
17337
17352
|
if (!getCustomUploader()) {
|
|
17338
17353
|
_context18.next = 8;
|
|
17339
17354
|
break;
|
|
@@ -17351,7 +17366,7 @@ function resumeAttachmentUploading(action) {
|
|
|
17351
17366
|
case 10:
|
|
17352
17367
|
_context18.prev = 10;
|
|
17353
17368
|
_context18.t0 = _context18["catch"](0);
|
|
17354
|
-
|
|
17369
|
+
log.info('error in resume attachment uploading', _context18.t0);
|
|
17355
17370
|
case 14:
|
|
17356
17371
|
case "end":
|
|
17357
17372
|
return _context18.stop();
|
|
@@ -17460,7 +17475,7 @@ function getMembers(action) {
|
|
|
17460
17475
|
case 22:
|
|
17461
17476
|
_context.prev = 22;
|
|
17462
17477
|
_context.t0 = _context["catch"](0);
|
|
17463
|
-
|
|
17478
|
+
log.info('ERROR in get members - ', _context.t0.message);
|
|
17464
17479
|
case 26:
|
|
17465
17480
|
case "end":
|
|
17466
17481
|
return _context.stop();
|
|
@@ -17564,7 +17579,7 @@ function addMembers(action) {
|
|
|
17564
17579
|
case 24:
|
|
17565
17580
|
_context3.prev = 24;
|
|
17566
17581
|
_context3.t0 = _context3["catch"](0);
|
|
17567
|
-
|
|
17582
|
+
log.info('error on add members... ', _context3.t0);
|
|
17568
17583
|
case 27:
|
|
17569
17584
|
case "end":
|
|
17570
17585
|
return _context3.stop();
|
|
@@ -17691,7 +17706,7 @@ function changeMemberRole(action) {
|
|
|
17691
17706
|
case 13:
|
|
17692
17707
|
_context6.prev = 13;
|
|
17693
17708
|
_context6.t0 = _context6["catch"](0);
|
|
17694
|
-
|
|
17709
|
+
log.info('error in change member role');
|
|
17695
17710
|
case 16:
|
|
17696
17711
|
case "end":
|
|
17697
17712
|
return _context6.stop();
|
|
@@ -17714,7 +17729,7 @@ function reportMember(action) {
|
|
|
17714
17729
|
case 7:
|
|
17715
17730
|
_context7.prev = 7;
|
|
17716
17731
|
_context7.t0 = _context7["catch"](2);
|
|
17717
|
-
|
|
17732
|
+
log.info('ERROR report user', _context7.t0.message);
|
|
17718
17733
|
case 10:
|
|
17719
17734
|
case "end":
|
|
17720
17735
|
return _context7.stop();
|
|
@@ -17744,7 +17759,7 @@ function getRoles(action) {
|
|
|
17744
17759
|
case 12:
|
|
17745
17760
|
_context8.prev = 12;
|
|
17746
17761
|
_context8.t0 = _context8["catch"](1);
|
|
17747
|
-
|
|
17762
|
+
log.info('ERROR get roles', _context8.t0);
|
|
17748
17763
|
_context8.next = 17;
|
|
17749
17764
|
return effects.put(getRolesFailAC((timeout || 0) + 300, (attempts || 0) + 1));
|
|
17750
17765
|
case 17:
|
|
@@ -17816,7 +17831,7 @@ function getContacts() {
|
|
|
17816
17831
|
case 11:
|
|
17817
17832
|
_context.prev = 11;
|
|
17818
17833
|
_context.t0 = _context["catch"](0);
|
|
17819
|
-
|
|
17834
|
+
log.info('ERROR in get contacts - :', _context.t0.message);
|
|
17820
17835
|
case 15:
|
|
17821
17836
|
case "end":
|
|
17822
17837
|
return _context.stop();
|
|
@@ -17878,7 +17893,7 @@ function blockUser(action) {
|
|
|
17878
17893
|
case 21:
|
|
17879
17894
|
_context2.prev = 21;
|
|
17880
17895
|
_context2.t0 = _context2["catch"](0);
|
|
17881
|
-
|
|
17896
|
+
log.info('error in block users', _context2.t0.message);
|
|
17882
17897
|
case 24:
|
|
17883
17898
|
case "end":
|
|
17884
17899
|
return _context2.stop();
|
|
@@ -17940,7 +17955,7 @@ function unblockUser(action) {
|
|
|
17940
17955
|
case 21:
|
|
17941
17956
|
_context3.prev = 21;
|
|
17942
17957
|
_context3.t0 = _context3["catch"](0);
|
|
17943
|
-
|
|
17958
|
+
log.info('error in unblock users', _context3.t0.message);
|
|
17944
17959
|
case 24:
|
|
17945
17960
|
case "end":
|
|
17946
17961
|
return _context3.stop();
|
|
@@ -17964,7 +17979,7 @@ function updateProfile(action) {
|
|
|
17964
17979
|
fileToUpload = {
|
|
17965
17980
|
data: avatarFile,
|
|
17966
17981
|
progress: function progress(progressPercent) {
|
|
17967
|
-
|
|
17982
|
+
log.info('upload percent - ', progressPercent);
|
|
17968
17983
|
}
|
|
17969
17984
|
};
|
|
17970
17985
|
_context4.next = 9;
|
|
@@ -17999,7 +18014,7 @@ function updateProfile(action) {
|
|
|
17999
18014
|
case 23:
|
|
18000
18015
|
_context4.prev = 23;
|
|
18001
18016
|
_context4.t0 = _context4["catch"](0);
|
|
18002
|
-
|
|
18017
|
+
log.info(_context4.t0, 'Error on update user');
|
|
18003
18018
|
case 26:
|
|
18004
18019
|
case "end":
|
|
18005
18020
|
return _context4.stop();
|
|
@@ -18043,7 +18058,7 @@ function getUsers(action) {
|
|
|
18043
18058
|
if (params.filter === 'username') {
|
|
18044
18059
|
usersQueryBuilder.filterByUsername();
|
|
18045
18060
|
}
|
|
18046
|
-
|
|
18061
|
+
log.info('user query params ..... ', params);
|
|
18047
18062
|
_context5.next = 17;
|
|
18048
18063
|
return effects.call(usersQueryBuilder.build);
|
|
18049
18064
|
case 17:
|
|
@@ -18068,7 +18083,7 @@ function getUsers(action) {
|
|
|
18068
18083
|
case 31:
|
|
18069
18084
|
_context5.prev = 31;
|
|
18070
18085
|
_context5.t0 = _context5["catch"](0);
|
|
18071
|
-
|
|
18086
|
+
log.info('ERROR on get users', _context5.t0.message);
|
|
18072
18087
|
case 35:
|
|
18073
18088
|
case "end":
|
|
18074
18089
|
return _context5.stop();
|
|
@@ -18106,7 +18121,7 @@ function loadMoreUsers(action) {
|
|
|
18106
18121
|
case 17:
|
|
18107
18122
|
_context6.prev = 17;
|
|
18108
18123
|
_context6.t0 = _context6["catch"](0);
|
|
18109
|
-
|
|
18124
|
+
log.info('ERROR load more users', _context6.t0.message);
|
|
18110
18125
|
case 21:
|
|
18111
18126
|
case "end":
|
|
18112
18127
|
return _context6.stop();
|
|
@@ -18415,7 +18430,7 @@ var SceytChat = function SceytChat(_ref) {
|
|
|
18415
18430
|
colors.outgoingMessageBackgroundXDark = moderateColor(themeColors[THEME_COLORS.ACCENT].dark || '', 0.75, true);
|
|
18416
18431
|
};
|
|
18417
18432
|
React.useEffect(function () {
|
|
18418
|
-
|
|
18433
|
+
log.info('client is changed.... ', client);
|
|
18419
18434
|
if (client) {
|
|
18420
18435
|
setClient(client);
|
|
18421
18436
|
setSceytChatClient(client);
|
|
@@ -18494,7 +18509,7 @@ var SceytChat = function SceytChat(_ref) {
|
|
|
18494
18509
|
try {
|
|
18495
18510
|
if (window.Notification && Notification.permission === 'default') {
|
|
18496
18511
|
Promise.resolve(Notification.requestPermission()).then(function (permission) {
|
|
18497
|
-
|
|
18512
|
+
log.info('permission:', permission);
|
|
18498
18513
|
});
|
|
18499
18514
|
}
|
|
18500
18515
|
} catch (e) {
|
|
@@ -18554,7 +18569,7 @@ var SceytChat = function SceytChat(_ref) {
|
|
|
18554
18569
|
}, [openChatOnUserInteraction]);
|
|
18555
18570
|
useDidUpdate(function () {
|
|
18556
18571
|
if (getRolesFail) {
|
|
18557
|
-
|
|
18572
|
+
log.info('getRolesFail ... ', getRolesFail);
|
|
18558
18573
|
}
|
|
18559
18574
|
if (getRolesFail && getRolesFail.attempts <= 5) {
|
|
18560
18575
|
setTimeout(function () {
|
|
@@ -18603,7 +18618,12 @@ var SceytChatContainer = function SceytChatContainer(_ref) {
|
|
|
18603
18618
|
showNotifications = _ref$showNotification === void 0 ? true : _ref$showNotification,
|
|
18604
18619
|
hideUserPresence = _ref.hideUserPresence,
|
|
18605
18620
|
openChatOnUserInteraction = _ref.openChatOnUserInteraction,
|
|
18606
|
-
autoSelectFirstChannel = _ref.autoSelectFirstChannel
|
|
18621
|
+
autoSelectFirstChannel = _ref.autoSelectFirstChannel,
|
|
18622
|
+
_ref$logLevel = _ref.logLevel,
|
|
18623
|
+
logLevel = _ref$logLevel === void 0 ? 'silent' : _ref$logLevel;
|
|
18624
|
+
React.useEffect(function () {
|
|
18625
|
+
log.setLevel(logLevel);
|
|
18626
|
+
}, []);
|
|
18607
18627
|
return /*#__PURE__*/React__default.createElement(reactRedux.Provider, {
|
|
18608
18628
|
store: store
|
|
18609
18629
|
}, /*#__PURE__*/React__default.createElement(SceytChat, {
|
|
@@ -19760,7 +19780,7 @@ var UsersPopup = function UsersPopup(_ref) {
|
|
|
19760
19780
|
if (actionType === 'selectUsers' && getSelectedUsers) {
|
|
19761
19781
|
getSelectedUsers(selectedMembersList, 'create');
|
|
19762
19782
|
} else {
|
|
19763
|
-
|
|
19783
|
+
log.info('call add members ... ', selectedMembersList);
|
|
19764
19784
|
dispatch(addMembersAC(channel.id, selectedMembersList));
|
|
19765
19785
|
}
|
|
19766
19786
|
}
|
|
@@ -20626,13 +20646,13 @@ var DropDown = function DropDown(_ref) {
|
|
|
20626
20646
|
var dropDownElem = dropDownRef.current;
|
|
20627
20647
|
var dropDownBodyElem = dropDownBodyRef.current;
|
|
20628
20648
|
if (dropDownElem && !dropDownElem.contains(e.target)) {
|
|
20629
|
-
|
|
20649
|
+
log.info('call toggle dropdown. .. ');
|
|
20630
20650
|
toggleDropdown();
|
|
20631
20651
|
}
|
|
20632
20652
|
if (isSelect && dropDownBodyElem && dropDownBodyElem.contains(e.target)) {
|
|
20633
20653
|
var listElement = dropDownBodyElem.getElementsByTagName('ul')[0];
|
|
20634
20654
|
if (listElement && listElement.contains(e.target)) {
|
|
20635
|
-
|
|
20655
|
+
log.info('call toggle dropdown. .. !!');
|
|
20636
20656
|
toggleDropdown();
|
|
20637
20657
|
}
|
|
20638
20658
|
}
|
|
@@ -22250,9 +22270,9 @@ var setAttachmentToCache = function setAttachmentToCache(attachmentUrl, attachme
|
|
|
22250
22270
|
caches.open(ATTACHMENTS_CACHE).then(function (cache) {
|
|
22251
22271
|
try {
|
|
22252
22272
|
cache.put(attachmentUrl, attachmentResponse).then(function () {
|
|
22253
|
-
|
|
22273
|
+
log.info('Cache success');
|
|
22254
22274
|
})["catch"](function (e) {
|
|
22255
|
-
|
|
22275
|
+
log.info('Error on cache attachment ... ', e);
|
|
22256
22276
|
caches["delete"](attachmentUrl);
|
|
22257
22277
|
});
|
|
22258
22278
|
return Promise.resolve();
|
|
@@ -22272,7 +22292,7 @@ var getAttachmentUrlFromCache = function getAttachmentUrlFromCache(attachmentUrl
|
|
|
22272
22292
|
if (response) {
|
|
22273
22293
|
return Promise.resolve(response.blob()).then(URL.createObjectURL);
|
|
22274
22294
|
} else {
|
|
22275
|
-
|
|
22295
|
+
log.info('The image or video is not cached', attachmentUrl);
|
|
22276
22296
|
return false;
|
|
22277
22297
|
}
|
|
22278
22298
|
});
|
|
@@ -22564,7 +22584,7 @@ var VideoPlayer = function VideoPlayer(_ref) {
|
|
|
22564
22584
|
var checkVideoInterval;
|
|
22565
22585
|
if (videoRef.current) {
|
|
22566
22586
|
checkVideoInterval = setInterval(function () {
|
|
22567
|
-
|
|
22587
|
+
log.info('videoRef.current.readyState . . . . ', videoRef && videoRef.current && videoRef.current.readyState);
|
|
22568
22588
|
if (videoRef.current && videoRef.current.readyState > 0) {
|
|
22569
22589
|
setVideoTime(videoRef.current.duration);
|
|
22570
22590
|
setVolume(videoRef.current.volume);
|
|
@@ -23178,7 +23198,7 @@ var SliderPopup = function SliderPopup(_ref) {
|
|
|
23178
23198
|
};
|
|
23179
23199
|
var handleCompleteDownload = function handleCompleteDownload(attachmentId, failed) {
|
|
23180
23200
|
if (failed) {
|
|
23181
|
-
|
|
23201
|
+
log.info('file download failed!');
|
|
23182
23202
|
}
|
|
23183
23203
|
var stateCopy = _extends({}, downloadingFilesMap);
|
|
23184
23204
|
delete stateCopy[attachmentId];
|
|
@@ -23348,7 +23368,7 @@ var SliderPopup = function SliderPopup(_ref) {
|
|
|
23348
23368
|
return Promise.reject(e);
|
|
23349
23369
|
}
|
|
23350
23370
|
})["catch"](function (e) {
|
|
23351
|
-
|
|
23371
|
+
log.info('fail to download image...... ', e);
|
|
23352
23372
|
});
|
|
23353
23373
|
} else {
|
|
23354
23374
|
if (!downloadedFiles[currentFile.id]) {
|
|
@@ -23374,7 +23394,7 @@ var SliderPopup = function SliderPopup(_ref) {
|
|
|
23374
23394
|
}
|
|
23375
23395
|
}
|
|
23376
23396
|
})["catch"](function (e) {
|
|
23377
|
-
return
|
|
23397
|
+
return log.info(e);
|
|
23378
23398
|
});
|
|
23379
23399
|
}
|
|
23380
23400
|
}, [currentFile]);
|
|
@@ -24587,7 +24607,7 @@ var getFrame = function getFrame(videoSrc, time) {
|
|
|
24587
24607
|
var pixels = ctx.getImageData(0, 0, canvas.width, canvas.height);
|
|
24588
24608
|
var binaryThumbHash = rgbaToThumbHash(pixels.width, pixels.height, pixels.data);
|
|
24589
24609
|
var thumb = binaryToBase64(binaryThumbHash);
|
|
24590
|
-
|
|
24610
|
+
log.info('generated thumb hash ... ', thumb);
|
|
24591
24611
|
clearInterval(b);
|
|
24592
24612
|
resolve({
|
|
24593
24613
|
thumb: thumb,
|
|
@@ -24987,7 +25007,7 @@ var AudioPlayer = function AudioPlayer(_ref) {
|
|
|
24987
25007
|
var audioDuration = wavesurfer.current.getDuration();
|
|
24988
25008
|
setCurrentTime(formatAudioVideoTime(audioDuration));
|
|
24989
25009
|
wavesurfer.current.drawBuffer = function (d) {
|
|
24990
|
-
|
|
25010
|
+
log.info('filters --- ', d);
|
|
24991
25011
|
};
|
|
24992
25012
|
});
|
|
24993
25013
|
wavesurfer.current.on('finish', function () {
|
|
@@ -25016,7 +25036,7 @@ var AudioPlayer = function AudioPlayer(_ref) {
|
|
|
25016
25036
|
}
|
|
25017
25037
|
});
|
|
25018
25038
|
}, function () {
|
|
25019
|
-
|
|
25039
|
+
log.info('Failed to init wavesurfer');
|
|
25020
25040
|
});
|
|
25021
25041
|
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
25022
25042
|
} catch (e) {
|
|
@@ -25145,7 +25165,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
25145
25165
|
attachmentThumb = attachment.metadata && attachment.metadata.tmb;
|
|
25146
25166
|
}
|
|
25147
25167
|
} catch (e) {
|
|
25148
|
-
|
|
25168
|
+
log.info('error on get attachmentThumb', e);
|
|
25149
25169
|
}
|
|
25150
25170
|
}
|
|
25151
25171
|
var downloadImage = function downloadImage(url) {
|
|
@@ -25344,7 +25364,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
25344
25364
|
return Promise.reject(e);
|
|
25345
25365
|
}
|
|
25346
25366
|
})["catch"](function (e) {
|
|
25347
|
-
|
|
25367
|
+
log.info('error on get attachment url from cache. .. ', e);
|
|
25348
25368
|
if (customDownloader) {
|
|
25349
25369
|
setDownloadingFile(true);
|
|
25350
25370
|
customDownloader(attachment.url, false).then(function (url) {
|
|
@@ -26970,7 +26990,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
26970
26990
|
var showMessageSenderName = (isUnreadMessage || prevMessageUserID !== messageUserID || firstMessageInInterval) && (channel.type === DEFAULT_CHANNEL_TYPE.DIRECT ? showSenderNameOnDirectChannel : showSenderNameOnGroupChannel) && (message.incoming || showSenderNameOnOwnMessages);
|
|
26971
26991
|
var selectionIsActive = selectedMessagesMap && selectedMessagesMap.size > 0;
|
|
26972
26992
|
var handleRemoveFailedAttachment = function handleRemoveFailedAttachment(attachmentId) {
|
|
26973
|
-
|
|
26993
|
+
log.info('remove attachment .. ', attachmentId);
|
|
26974
26994
|
};
|
|
26975
26995
|
return /*#__PURE__*/React__default.createElement(MessageBodyContainer, {
|
|
26976
26996
|
className: 'messageBody',
|
|
@@ -27590,7 +27610,7 @@ var Message$1 = function Message(_ref) {
|
|
|
27590
27610
|
if (isVisible && message.incoming && !(message.userMarkers && message.userMarkers.length && message.userMarkers.find(function (marker) {
|
|
27591
27611
|
return marker.name === MESSAGE_DELIVERY_STATUS.READ;
|
|
27592
27612
|
})) && channel.newMessageCount && channel.newMessageCount > 0 && connectionStatus === CONNECTION_STATUS.CONNECTED) {
|
|
27593
|
-
|
|
27613
|
+
log.info('send displayed marker for message ... ', message);
|
|
27594
27614
|
dispatch(markMessagesAsReadAC(channel.id, [message.id]));
|
|
27595
27615
|
}
|
|
27596
27616
|
};
|
|
@@ -28679,7 +28699,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
28679
28699
|
}
|
|
28680
28700
|
}, [messages]);
|
|
28681
28701
|
useDidUpdate(function () {
|
|
28682
|
-
|
|
28702
|
+
log.info('connection status is changed.. .... ', connectionStatus, 'channel ... ', channel);
|
|
28683
28703
|
if (connectionStatus === CONNECTION_STATUS.CONNECTED) {
|
|
28684
28704
|
loading = false;
|
|
28685
28705
|
prevDisable = false;
|
|
@@ -30549,7 +30569,7 @@ function EmojisPopup$1(_ref2) {
|
|
|
30549
30569
|
editor = _useLexicalComposerCo[0];
|
|
30550
30570
|
richTextEditor = editor;
|
|
30551
30571
|
} catch (e) {
|
|
30552
|
-
|
|
30572
|
+
log.info('error getting editor', e);
|
|
30553
30573
|
}
|
|
30554
30574
|
var _useState = React.useState(false),
|
|
30555
30575
|
rendered = _useState[0],
|
|
@@ -31092,7 +31112,7 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
31092
31112
|
var buffer = _ref2[0],
|
|
31093
31113
|
blob = _ref2[1];
|
|
31094
31114
|
setCurrentTime(0);
|
|
31095
|
-
|
|
31115
|
+
log.info(buffer, blob);
|
|
31096
31116
|
var file = new File(buffer, 'record.mp3', {
|
|
31097
31117
|
type: blob.type,
|
|
31098
31118
|
lastModified: Date.now()
|
|
@@ -31130,7 +31150,7 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
31130
31150
|
});
|
|
31131
31151
|
}
|
|
31132
31152
|
}, function (e) {
|
|
31133
|
-
|
|
31153
|
+
log.info('Error decoding audio data: ' + e.err);
|
|
31134
31154
|
});
|
|
31135
31155
|
};
|
|
31136
31156
|
reader.readAsArrayBuffer(blob);
|
|
@@ -31228,7 +31248,7 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
31228
31248
|
}();
|
|
31229
31249
|
return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
|
|
31230
31250
|
}, function () {
|
|
31231
|
-
|
|
31251
|
+
log.info('Failed to init wavesurfer');
|
|
31232
31252
|
});
|
|
31233
31253
|
return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
|
|
31234
31254
|
} catch (e) {
|
|
@@ -31259,7 +31279,7 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
31259
31279
|
setRecorder(recorder);
|
|
31260
31280
|
});
|
|
31261
31281
|
}, function () {
|
|
31262
|
-
|
|
31282
|
+
log.info('Failed to init mic-recorder-to-mp3');
|
|
31263
31283
|
});
|
|
31264
31284
|
if (_temp4 && _temp4.then) return _temp4.then(function () {});
|
|
31265
31285
|
}
|
|
@@ -31690,7 +31710,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
31690
31710
|
handleEditMessage();
|
|
31691
31711
|
} else if (messageText.trim() || attachments.length && attachments.length > 0) {
|
|
31692
31712
|
var messageTexToSend = messageText.trim();
|
|
31693
|
-
|
|
31713
|
+
log.info('messageTexToSend . . . . .', messageTexToSend);
|
|
31694
31714
|
var messageToSend = {
|
|
31695
31715
|
body: messageTexToSend,
|
|
31696
31716
|
bodyAttributes: messageBodyAttributes,
|
|
@@ -31709,7 +31729,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
31709
31729
|
});
|
|
31710
31730
|
}
|
|
31711
31731
|
messageToSend.mentionedMembers = mentionMembersToSend;
|
|
31712
|
-
|
|
31732
|
+
log.info('message to send ..........................................', messageToSend);
|
|
31713
31733
|
if (messageForReply) {
|
|
31714
31734
|
messageToSend.parentMessage = messageForReply;
|
|
31715
31735
|
}
|
|
@@ -32233,7 +32253,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
32233
32253
|
dataFromDb = _getDataFromDB;
|
|
32234
32254
|
});
|
|
32235
32255
|
}, function (e) {
|
|
32236
|
-
|
|
32256
|
+
log.info('error in get data from db . . . . ', e);
|
|
32237
32257
|
});
|
|
32238
32258
|
return _temp11 && _temp11.then ? _temp11.then(_temp12) : _temp12(_temp11);
|
|
32239
32259
|
});
|
|
@@ -32242,7 +32262,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
32242
32262
|
}
|
|
32243
32263
|
};
|
|
32244
32264
|
reader.onerror = function (e) {
|
|
32245
|
-
|
|
32265
|
+
log.info(' error on read file onError', e);
|
|
32246
32266
|
};
|
|
32247
32267
|
reader.readAsBinaryString(file);
|
|
32248
32268
|
return Promise.resolve();
|
|
@@ -32353,7 +32373,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
32353
32373
|
}
|
|
32354
32374
|
};
|
|
32355
32375
|
reader.onerror = function (e) {
|
|
32356
|
-
|
|
32376
|
+
log.info(' error on read file onError', e);
|
|
32357
32377
|
};
|
|
32358
32378
|
reader.readAsBinaryString(recordedFile.file);
|
|
32359
32379
|
}
|
|
@@ -33355,7 +33375,7 @@ var Actions = function Actions(_ref) {
|
|
|
33355
33375
|
dispatch(deleteAllMessagesAC(channel.id));
|
|
33356
33376
|
};
|
|
33357
33377
|
var handleNotificationOnOff = function handleNotificationOnOff(expTime) {
|
|
33358
|
-
|
|
33378
|
+
log.info('exp time ... ', expTime);
|
|
33359
33379
|
if (channel.muted) {
|
|
33360
33380
|
dispatch(turnOnNotificationsAC());
|
|
33361
33381
|
} else {
|
|
@@ -33363,7 +33383,7 @@ var Actions = function Actions(_ref) {
|
|
|
33363
33383
|
}
|
|
33364
33384
|
};
|
|
33365
33385
|
var handleToggleChannelMarkAs = function handleToggleChannelMarkAs() {
|
|
33366
|
-
|
|
33386
|
+
log.info('handle action mark read ', channel.unread);
|
|
33367
33387
|
if (channel.unread) {
|
|
33368
33388
|
dispatch(markChannelAsReadAC(channel.id));
|
|
33369
33389
|
} else {
|
|
@@ -33455,7 +33475,7 @@ var Actions = function Actions(_ref) {
|
|
|
33455
33475
|
}, "Mute forever"))))), showStarredMessages && !channel.isMockChannel && (/*#__PURE__*/React__default.createElement(ActionItem, {
|
|
33456
33476
|
key: 1,
|
|
33457
33477
|
onClick: function onClick() {
|
|
33458
|
-
return
|
|
33478
|
+
return log.info('stared messages');
|
|
33459
33479
|
},
|
|
33460
33480
|
order: starredMessagesOrder,
|
|
33461
33481
|
iconColor: staredMessagesIconColor || textSecondary,
|
|
@@ -33548,7 +33568,7 @@ var Actions = function Actions(_ref) {
|
|
|
33548
33568
|
onClick: function onClick() {
|
|
33549
33569
|
setPopupButtonText('Report');
|
|
33550
33570
|
setPopupTitle('Report channel');
|
|
33551
|
-
|
|
33571
|
+
log.info('Report channel');
|
|
33552
33572
|
}
|
|
33553
33573
|
}, reportChannelIcon || /*#__PURE__*/React__default.createElement(DefaultReportIcon, null), " Report", ' ', channel.type === DEFAULT_CHANNEL_TYPE.BROADCAST || channel.type === DEFAULT_CHANNEL_TYPE.PUBLIC ? 'channel' : channel.type === DEFAULT_CHANNEL_TYPE.GROUP || channel.type === DEFAULT_CHANNEL_TYPE.PRIVATE ? 'group' : 'chat')))), showClearHistory && !channel.isMockChannel && (channel.type === DEFAULT_CHANNEL_TYPE.GROUP || channel.type === DEFAULT_CHANNEL_TYPE.PRIVATE || channel.type === DEFAULT_CHANNEL_TYPE.DIRECT) && (/*#__PURE__*/React__default.createElement(ActionItem, {
|
|
33554
33574
|
key: 10,
|
|
@@ -34292,7 +34312,7 @@ var Files = function Files(_ref) {
|
|
|
34292
34312
|
React.useEffect(function () {
|
|
34293
34313
|
dispatch(getAttachmentsAC(channelId, channelDetailsTabs.file));
|
|
34294
34314
|
}, [channelId]);
|
|
34295
|
-
|
|
34315
|
+
log.info('attachments. .. . ', attachments);
|
|
34296
34316
|
return /*#__PURE__*/React__default.createElement(Container$o, {
|
|
34297
34317
|
theme: theme
|
|
34298
34318
|
}, attachments.map(function (file) {
|
|
@@ -35055,10 +35075,10 @@ var EditChannel = function EditChannel(_ref) {
|
|
|
35055
35075
|
} else {
|
|
35056
35076
|
handleUpdateChannel(_extends({}, newSubject !== channel.subject && {
|
|
35057
35077
|
subject: newSubject
|
|
35058
|
-
},
|
|
35059
|
-
metadata: _extends({}, channel.metadata, {
|
|
35078
|
+
}, {
|
|
35079
|
+
metadata: _extends({}, (channel === null || channel === void 0 ? void 0 : channel.metadata) || {}, newDescription !== channel.metadata.d ? {
|
|
35060
35080
|
d: newDescription
|
|
35061
|
-
})
|
|
35081
|
+
} : {})
|
|
35062
35082
|
}, newAvatar.url !== channel.avatarUrl && {
|
|
35063
35083
|
avatar: newAvatar.src.file
|
|
35064
35084
|
}));
|