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.modern.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React__default, { createElement, useRef, useEffect, useLayoutEffect, useState, useMemo, useCallback, memo, createRef } from 'react';
|
|
2
2
|
import { useSelector, useDispatch, shallowEqual, Provider } from 'react-redux';
|
|
3
|
+
import log from 'loglevel';
|
|
3
4
|
import createSagaMiddleware, { eventChannel } from 'redux-saga';
|
|
4
5
|
import { createStore, combineReducers, applyMiddleware, compose } from 'redux';
|
|
5
6
|
import FileSaver from 'file-saver';
|
|
@@ -7745,7 +7746,7 @@ var pauseUpload = function pauseUpload(attachmentId) {
|
|
|
7745
7746
|
if (pendingUploaders[attachmentId]) {
|
|
7746
7747
|
return pendingUploaders[attachmentId].stop();
|
|
7747
7748
|
} else {
|
|
7748
|
-
|
|
7749
|
+
log.info('Unknown uploading task');
|
|
7749
7750
|
return false;
|
|
7750
7751
|
}
|
|
7751
7752
|
};
|
|
@@ -7753,7 +7754,7 @@ var resumeUpload = function resumeUpload(attachmentId) {
|
|
|
7753
7754
|
if (pendingUploaders[attachmentId]) {
|
|
7754
7755
|
return pendingUploaders[attachmentId].resume();
|
|
7755
7756
|
} else {
|
|
7756
|
-
|
|
7757
|
+
log.info('Unknown uploading task');
|
|
7757
7758
|
return false;
|
|
7758
7759
|
}
|
|
7759
7760
|
};
|
|
@@ -7821,7 +7822,7 @@ var downloadFile = function downloadFile(attachment, download, done, progressCal
|
|
|
7821
7822
|
}();
|
|
7822
7823
|
if (_temp && _temp.then) return _temp.then(function () {});
|
|
7823
7824
|
}, function (e) {
|
|
7824
|
-
|
|
7825
|
+
log.info('error on download... ', e);
|
|
7825
7826
|
if (done) {
|
|
7826
7827
|
done(attachment.id || '', true);
|
|
7827
7828
|
}
|
|
@@ -8527,7 +8528,7 @@ var MessageReducer = (function (state, _temp) {
|
|
|
8527
8528
|
return message;
|
|
8528
8529
|
});
|
|
8529
8530
|
if (!messageFound && addIfNotExists) {
|
|
8530
|
-
|
|
8531
|
+
log.info('message not found on update message, add message to list .. ...', params);
|
|
8531
8532
|
newState.activeChannelMessages = [].concat(newState.activeChannelMessages, [params]);
|
|
8532
8533
|
}
|
|
8533
8534
|
return newState;
|
|
@@ -8836,7 +8837,7 @@ var MembersReducer = (function (state, _ref) {
|
|
|
8836
8837
|
case UPDATE_MEMBERS:
|
|
8837
8838
|
{
|
|
8838
8839
|
var _members2 = payload.members;
|
|
8839
|
-
|
|
8840
|
+
log.info('UPDATE_MEMBERS . ... .. ', _members2);
|
|
8840
8841
|
var updateMembers = [];
|
|
8841
8842
|
var membersCopy = [].concat(newState.activeChannelMembers);
|
|
8842
8843
|
if (_members2.length) {
|
|
@@ -8857,7 +8858,7 @@ var MembersReducer = (function (state, _ref) {
|
|
|
8857
8858
|
case UPDATE_MEMBERS_PRESENCE:
|
|
8858
8859
|
{
|
|
8859
8860
|
var usersMap = payload.usersMap;
|
|
8860
|
-
|
|
8861
|
+
log.info('UPDATE_MEMBERS_PRESENCE . ... .. ', usersMap);
|
|
8861
8862
|
var _updateMembers = [];
|
|
8862
8863
|
if (newState.activeChannelMembers.length) {
|
|
8863
8864
|
var _membersCopy = [].concat(newState.activeChannelMembers);
|
|
@@ -11345,7 +11346,7 @@ var MessageTextFormat = function MessageTextFormat(_ref2) {
|
|
|
11345
11346
|
try {
|
|
11346
11347
|
var messageText = [];
|
|
11347
11348
|
var linkify = new LinkifyIt();
|
|
11348
|
-
var messageBodyAttributes = message.bodyAttributes &&
|
|
11349
|
+
var messageBodyAttributes = message.bodyAttributes && JSON.parse(JSON.stringify(message.bodyAttributes));
|
|
11349
11350
|
if (message.body && messageBodyAttributes && messageBodyAttributes.length > 0) {
|
|
11350
11351
|
var combinedAttributesList = combineMessageAttributes(messageBodyAttributes);
|
|
11351
11352
|
var textPart = text;
|
|
@@ -11412,7 +11413,7 @@ var MessageTextFormat = function MessageTextFormat(_ref2) {
|
|
|
11412
11413
|
}, "" + text.slice(attributeOffset, attributeOffset + attribute.length))), index === combinedAttributesList.length - 1 ? secondPart : '');
|
|
11413
11414
|
}
|
|
11414
11415
|
} catch (e) {
|
|
11415
|
-
|
|
11416
|
+
log.info('Error on format message text, message: ', message, 'error: ', e);
|
|
11416
11417
|
}
|
|
11417
11418
|
});
|
|
11418
11419
|
} else {
|
|
@@ -11423,8 +11424,8 @@ var MessageTextFormat = function MessageTextFormat(_ref2) {
|
|
|
11423
11424
|
}
|
|
11424
11425
|
return messageText.length > 1 ? asSampleText ? messageText.join('') : messageText : text;
|
|
11425
11426
|
} catch (e) {
|
|
11426
|
-
|
|
11427
|
-
|
|
11427
|
+
log.info(' failed to format message .>>> ', e);
|
|
11428
|
+
log.info('message: ', message);
|
|
11428
11429
|
return text;
|
|
11429
11430
|
}
|
|
11430
11431
|
};
|
|
@@ -11808,7 +11809,7 @@ function watchForEvents() {
|
|
|
11808
11809
|
};
|
|
11809
11810
|
});
|
|
11810
11811
|
_loop = /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
11811
|
-
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,
|
|
11812
|
+
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;
|
|
11812
11813
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11813
11814
|
while (1) switch (_context.prev = _context.next) {
|
|
11814
11815
|
case 0:
|
|
@@ -11819,11 +11820,11 @@ function watchForEvents() {
|
|
|
11819
11820
|
type = _yield$take.type;
|
|
11820
11821
|
args = _yield$take.args;
|
|
11821
11822
|
_context.t0 = type;
|
|
11822
|
-
_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 ?
|
|
11823
|
+
_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;
|
|
11823
11824
|
break;
|
|
11824
11825
|
case 8:
|
|
11825
11826
|
createdChannel = args.createdChannel;
|
|
11826
|
-
|
|
11827
|
+
log.info('CHANNEL_EVENT_CREATE ... ', createdChannel);
|
|
11827
11828
|
channelFilterTypes = getChannelTypesFilter();
|
|
11828
11829
|
if (!(channelFilterTypes !== null && channelFilterTypes !== void 0 && channelFilterTypes.length ? channelFilterTypes.includes(createdChannel.type) : true)) {
|
|
11829
11830
|
_context.next = 24;
|
|
@@ -11853,10 +11854,10 @@ function watchForEvents() {
|
|
|
11853
11854
|
addChannelToAllChannels(createdChannel);
|
|
11854
11855
|
}
|
|
11855
11856
|
case 24:
|
|
11856
|
-
return _context.abrupt("break",
|
|
11857
|
+
return _context.abrupt("break", 423);
|
|
11857
11858
|
case 25:
|
|
11858
11859
|
channel = args.channel;
|
|
11859
|
-
|
|
11860
|
+
log.info('channel JOIN ... . ', channel);
|
|
11860
11861
|
_context.next = 29;
|
|
11861
11862
|
return call(getActiveChannelId);
|
|
11862
11863
|
case 29:
|
|
@@ -11864,10 +11865,10 @@ function watchForEvents() {
|
|
|
11864
11865
|
if (!_chan2) {
|
|
11865
11866
|
addChannelToAllChannels(channel);
|
|
11866
11867
|
}
|
|
11867
|
-
return _context.abrupt("break",
|
|
11868
|
+
return _context.abrupt("break", 423);
|
|
11868
11869
|
case 34:
|
|
11869
11870
|
_channel = args.channel, member = args.member;
|
|
11870
|
-
|
|
11871
|
+
log.info('channel LEAVE ... ', _channel, member);
|
|
11871
11872
|
_channelExists = checkChannelExists(_channel.id);
|
|
11872
11873
|
_context.next = 39;
|
|
11873
11874
|
return call(getActiveChannelId);
|
|
@@ -11917,9 +11918,9 @@ function watchForEvents() {
|
|
|
11917
11918
|
mutedTill: _channel.mutedTill
|
|
11918
11919
|
});
|
|
11919
11920
|
case 57:
|
|
11920
|
-
return _context.abrupt("break",
|
|
11921
|
+
return _context.abrupt("break", 423);
|
|
11921
11922
|
case 58:
|
|
11922
|
-
|
|
11923
|
+
log.info('channel BLOCK ... ');
|
|
11923
11924
|
_channel2 = args.channel;
|
|
11924
11925
|
_channelExists2 = checkChannelExists(_channel2.id);
|
|
11925
11926
|
if (!_channelExists2) {
|
|
@@ -11929,13 +11930,13 @@ function watchForEvents() {
|
|
|
11929
11930
|
_context.next = 64;
|
|
11930
11931
|
return put(removeChannelAC(_channel2.id));
|
|
11931
11932
|
case 64:
|
|
11932
|
-
return _context.abrupt("break",
|
|
11933
|
+
return _context.abrupt("break", 423);
|
|
11933
11934
|
case 65:
|
|
11934
|
-
|
|
11935
|
-
return _context.abrupt("break",
|
|
11935
|
+
log.info('channel UNBLOCK ... ');
|
|
11936
|
+
return _context.abrupt("break", 423);
|
|
11936
11937
|
case 67:
|
|
11937
11938
|
_channel3 = args.channel, removedMembers = args.removedMembers;
|
|
11938
|
-
|
|
11939
|
+
log.info('channel KICK_MEMBERS ... ', removedMembers);
|
|
11939
11940
|
_context.next = 71;
|
|
11940
11941
|
return call(getActiveChannelId);
|
|
11941
11942
|
case 71:
|
|
@@ -11996,10 +11997,10 @@ function watchForEvents() {
|
|
|
11996
11997
|
muted: _channel3.muted,
|
|
11997
11998
|
mutedTill: _channel3.mutedTill
|
|
11998
11999
|
});
|
|
11999
|
-
return _context.abrupt("break",
|
|
12000
|
+
return _context.abrupt("break", 423);
|
|
12000
12001
|
case 96:
|
|
12001
12002
|
_channel4 = args.channel, addedMembers = args.addedMembers;
|
|
12002
|
-
|
|
12003
|
+
log.info('channel ADD_MEMBERS ... ', addedMembers);
|
|
12003
12004
|
_context.next = 100;
|
|
12004
12005
|
return call(getActiveChannelId);
|
|
12005
12006
|
case 100:
|
|
@@ -12045,13 +12046,13 @@ function watchForEvents() {
|
|
|
12045
12046
|
muted: _channel4.muted,
|
|
12046
12047
|
mutedTill: _channel4.mutedTill
|
|
12047
12048
|
});
|
|
12048
|
-
return _context.abrupt("break",
|
|
12049
|
+
return _context.abrupt("break", 423);
|
|
12049
12050
|
case 119:
|
|
12050
12051
|
updatedChannel = args.updatedChannel;
|
|
12051
12052
|
_channelExists5 = checkChannelExists(updatedChannel.id);
|
|
12052
|
-
subject = updatedChannel.subject, avatarUrl = updatedChannel.avatarUrl, muted = updatedChannel.muted, mutedTill = updatedChannel.mutedTill;
|
|
12053
|
+
subject = updatedChannel.subject, avatarUrl = updatedChannel.avatarUrl, muted = updatedChannel.muted, mutedTill = updatedChannel.mutedTill, metadata = updatedChannel.metadata;
|
|
12053
12054
|
if (!_channelExists5) {
|
|
12054
|
-
_context.next =
|
|
12055
|
+
_context.next = 131;
|
|
12055
12056
|
break;
|
|
12056
12057
|
}
|
|
12057
12058
|
_context.next = 125;
|
|
@@ -12062,117 +12063,131 @@ function watchForEvents() {
|
|
|
12062
12063
|
mutedTill: mutedTill
|
|
12063
12064
|
}));
|
|
12064
12065
|
case 125:
|
|
12066
|
+
_context.next = 127;
|
|
12067
|
+
return call(getActiveChannelId);
|
|
12068
|
+
case 127:
|
|
12069
|
+
_activeChannelId4 = _context.sent;
|
|
12070
|
+
if (!(_activeChannelId4 === updatedChannel.id)) {
|
|
12071
|
+
_context.next = 131;
|
|
12072
|
+
break;
|
|
12073
|
+
}
|
|
12074
|
+
_context.next = 131;
|
|
12075
|
+
return put(setActiveChannelAC(_extends({}, updatedChannel, {
|
|
12076
|
+
metadata: isJSON(metadata) ? JSON.parse(metadata) : metadata
|
|
12077
|
+
})));
|
|
12078
|
+
case 131:
|
|
12065
12079
|
_groupName3 = getChannelGroupName(updatedChannel);
|
|
12066
|
-
_context.next =
|
|
12080
|
+
_context.next = 134;
|
|
12067
12081
|
return put(updateSearchedChannelDataAC(updatedChannel.id, {
|
|
12068
12082
|
subject: subject,
|
|
12069
12083
|
avatarUrl: avatarUrl,
|
|
12070
12084
|
muted: muted,
|
|
12071
12085
|
mutedTill: mutedTill
|
|
12072
12086
|
}, _groupName3));
|
|
12073
|
-
case
|
|
12087
|
+
case 134:
|
|
12074
12088
|
updateChannelOnAllChannels(updatedChannel.id, {
|
|
12075
12089
|
subject: subject,
|
|
12076
12090
|
avatarUrl: avatarUrl,
|
|
12077
12091
|
muted: muted,
|
|
12078
|
-
mutedTill: mutedTill
|
|
12092
|
+
mutedTill: mutedTill,
|
|
12093
|
+
metadata: isJSON(metadata) ? JSON.parse(metadata) : metadata
|
|
12079
12094
|
});
|
|
12080
|
-
return _context.abrupt("break",
|
|
12081
|
-
case
|
|
12095
|
+
return _context.abrupt("break", 423);
|
|
12096
|
+
case 136:
|
|
12082
12097
|
_channel5 = args.channel, message = args.message;
|
|
12083
|
-
|
|
12098
|
+
log.info('channel MESSAGE ... id : ', message.id, ' message: ', message, ' channel.id: ', _channel5.id);
|
|
12084
12099
|
messageToHandle = handleNewMessages ? handleNewMessages(message, _channel5) : message;
|
|
12085
12100
|
_channelFilterTypes = getChannelTypesFilter();
|
|
12086
12101
|
if (!(messageToHandle && _channel5 && (_channelFilterTypes !== null && _channelFilterTypes !== void 0 && _channelFilterTypes.length ? _channelFilterTypes.includes(_channel5.type) : true))) {
|
|
12087
|
-
_context.next =
|
|
12102
|
+
_context.next = 198;
|
|
12088
12103
|
break;
|
|
12089
12104
|
}
|
|
12090
12105
|
_channel5.metadata = isJSON(_channel5.metadata) ? JSON.parse(_channel5.metadata) : _channel5.metadata;
|
|
12091
|
-
_context.next =
|
|
12106
|
+
_context.next = 144;
|
|
12092
12107
|
return call(getActiveChannelId);
|
|
12093
|
-
case
|
|
12094
|
-
|
|
12108
|
+
case 144:
|
|
12109
|
+
_activeChannelId5 = _context.sent;
|
|
12095
12110
|
_channelExists6 = checkChannelExists(_channel5.id);
|
|
12096
12111
|
channelForAdd = JSON.parse(JSON.stringify(_channel5));
|
|
12097
|
-
_context.next =
|
|
12112
|
+
_context.next = 149;
|
|
12098
12113
|
return put(addChannelAC(channelForAdd));
|
|
12099
|
-
case
|
|
12114
|
+
case 149:
|
|
12100
12115
|
if (_channelExists6) {
|
|
12101
|
-
_context.next =
|
|
12116
|
+
_context.next = 154;
|
|
12102
12117
|
break;
|
|
12103
12118
|
}
|
|
12104
|
-
_context.next =
|
|
12119
|
+
_context.next = 152;
|
|
12105
12120
|
return call(setChannelInMap, _channel5);
|
|
12106
|
-
case
|
|
12107
|
-
_context.next =
|
|
12121
|
+
case 152:
|
|
12122
|
+
_context.next = 157;
|
|
12108
12123
|
break;
|
|
12109
|
-
case
|
|
12124
|
+
case 154:
|
|
12110
12125
|
if (message.repliedInThread) {
|
|
12111
|
-
_context.next =
|
|
12126
|
+
_context.next = 157;
|
|
12112
12127
|
break;
|
|
12113
12128
|
}
|
|
12114
|
-
_context.next =
|
|
12129
|
+
_context.next = 157;
|
|
12115
12130
|
return put(updateChannelLastMessageAC(message, channelForAdd));
|
|
12116
|
-
case
|
|
12117
|
-
if (!(_channel5.id ===
|
|
12118
|
-
_context.next =
|
|
12131
|
+
case 157:
|
|
12132
|
+
if (!(_channel5.id === _activeChannelId5)) {
|
|
12133
|
+
_context.next = 169;
|
|
12119
12134
|
break;
|
|
12120
12135
|
}
|
|
12121
12136
|
if (getHasNextCached()) {
|
|
12122
|
-
_context.next =
|
|
12137
|
+
_context.next = 161;
|
|
12123
12138
|
break;
|
|
12124
12139
|
}
|
|
12125
|
-
_context.next =
|
|
12140
|
+
_context.next = 161;
|
|
12126
12141
|
return put(addMessageAC(message));
|
|
12127
|
-
case
|
|
12142
|
+
case 161:
|
|
12128
12143
|
addAllMessages([message], MESSAGE_LOAD_DIRECTION.NEXT);
|
|
12129
|
-
_context.next =
|
|
12144
|
+
_context.next = 165;
|
|
12130
12145
|
return select(messagesHasNextSelector);
|
|
12131
|
-
case
|
|
12146
|
+
case 165:
|
|
12132
12147
|
hasNextMessage = _context.sent;
|
|
12133
12148
|
if (!(!getHasNextCached() && !hasNextMessage)) {
|
|
12134
|
-
_context.next =
|
|
12149
|
+
_context.next = 169;
|
|
12135
12150
|
break;
|
|
12136
12151
|
}
|
|
12137
|
-
_context.next =
|
|
12152
|
+
_context.next = 169;
|
|
12138
12153
|
return put(scrollToNewMessageAC(true, false, true));
|
|
12139
|
-
case
|
|
12154
|
+
case 169:
|
|
12140
12155
|
if (getMessagesFromMap(_channel5.id) && getMessagesFromMap(_channel5.id).length) {
|
|
12141
12156
|
addMessageToMap(_channel5.id, message);
|
|
12142
12157
|
}
|
|
12143
|
-
_context.next =
|
|
12158
|
+
_context.next = 172;
|
|
12144
12159
|
return put(updateChannelDataAC(_channel5.id, _extends({}, channelForAdd, {
|
|
12145
12160
|
userMessageReactions: [],
|
|
12146
12161
|
lastReactedMessage: null
|
|
12147
12162
|
})));
|
|
12148
|
-
case
|
|
12163
|
+
case 172:
|
|
12149
12164
|
_groupName4 = getChannelGroupName(_channel5);
|
|
12150
|
-
_context.next =
|
|
12165
|
+
_context.next = 175;
|
|
12151
12166
|
return put(updateSearchedChannelDataAC(_channel5.id, _extends({}, channelForAdd, {
|
|
12152
12167
|
userMessageReactions: [],
|
|
12153
12168
|
lastReactedMessage: null
|
|
12154
12169
|
}), _groupName4));
|
|
12155
|
-
case
|
|
12170
|
+
case 175:
|
|
12156
12171
|
showNotifications = getShowNotifications();
|
|
12157
12172
|
if (!(showNotifications && !message.silent && message.user.id !== SceytChatClient.user.id && !_channel5.muted)) {
|
|
12158
|
-
_context.next =
|
|
12173
|
+
_context.next = 188;
|
|
12159
12174
|
break;
|
|
12160
12175
|
}
|
|
12161
12176
|
if (!(Notification.permission === 'granted')) {
|
|
12162
|
-
_context.next =
|
|
12177
|
+
_context.next = 188;
|
|
12163
12178
|
break;
|
|
12164
12179
|
}
|
|
12165
|
-
_context.next =
|
|
12180
|
+
_context.next = 180;
|
|
12166
12181
|
return select(browserTabIsActiveSelector);
|
|
12167
|
-
case
|
|
12182
|
+
case 180:
|
|
12168
12183
|
tabIsActive = _context.sent;
|
|
12169
|
-
if (!(document.visibilityState !== 'visible' || !tabIsActive || _channel5.id !==
|
|
12170
|
-
_context.next =
|
|
12184
|
+
if (!(document.visibilityState !== 'visible' || !tabIsActive || _channel5.id !== _activeChannelId5)) {
|
|
12185
|
+
_context.next = 188;
|
|
12171
12186
|
break;
|
|
12172
12187
|
}
|
|
12173
|
-
_context.next =
|
|
12188
|
+
_context.next = 184;
|
|
12174
12189
|
return select(contactsMapSelector);
|
|
12175
|
-
case
|
|
12190
|
+
case 184:
|
|
12176
12191
|
contactsMap = _context.sent;
|
|
12177
12192
|
_getFromContacts = getShowOnlyContactUsers();
|
|
12178
12193
|
messageBody = MessageTextFormat({
|
|
@@ -12186,43 +12201,43 @@ function watchForEvents() {
|
|
|
12186
12201
|
setNotification(messageBody, message.user, _channel5, undefined, message.attachments && message.attachments.length ? message.attachments.find(function (att) {
|
|
12187
12202
|
return att.type !== attachmentTypes.link;
|
|
12188
12203
|
}) : undefined);
|
|
12189
|
-
case
|
|
12190
|
-
|
|
12204
|
+
case 188:
|
|
12205
|
+
log.info('send delivered for message . .. . ', message);
|
|
12191
12206
|
if (!(message.repliedInThread && message.parentMessage.id)) {
|
|
12192
|
-
_context.next =
|
|
12207
|
+
_context.next = 194;
|
|
12193
12208
|
break;
|
|
12194
12209
|
}
|
|
12195
|
-
_context.next =
|
|
12210
|
+
_context.next = 192;
|
|
12196
12211
|
return put(markMessagesAsDeliveredAC(message.parentMessage.id, [message.id]));
|
|
12197
|
-
case
|
|
12198
|
-
_context.next =
|
|
12212
|
+
case 192:
|
|
12213
|
+
_context.next = 196;
|
|
12199
12214
|
break;
|
|
12200
|
-
case
|
|
12201
|
-
_context.next =
|
|
12215
|
+
case 194:
|
|
12216
|
+
_context.next = 196;
|
|
12202
12217
|
return put(markMessagesAsDeliveredAC(_channel5.id, [message.id]));
|
|
12203
|
-
case
|
|
12218
|
+
case 196:
|
|
12204
12219
|
updateChannelOnAllChannels(_channel5.id, _extends({}, channelForAdd, {
|
|
12205
12220
|
userMessageReactions: [],
|
|
12206
12221
|
lastReactedMessage: null
|
|
12207
12222
|
}));
|
|
12208
12223
|
updateChannelLastMessageOnAllChannels(_channel5.id, _channel5.lastMessage);
|
|
12209
|
-
case
|
|
12210
|
-
return _context.abrupt("break",
|
|
12211
|
-
case
|
|
12224
|
+
case 198:
|
|
12225
|
+
return _context.abrupt("break", 423);
|
|
12226
|
+
case 199:
|
|
12212
12227
|
channelId = args.channelId, markerList = args.markerList;
|
|
12213
|
-
_context.next =
|
|
12228
|
+
_context.next = 202;
|
|
12214
12229
|
return call(getChannelFromMap, channelId);
|
|
12215
|
-
case
|
|
12230
|
+
case 202:
|
|
12216
12231
|
_channel6 = _context.sent;
|
|
12217
|
-
|
|
12232
|
+
log.info('channel MESSAGE_MARKERS_RECEIVED ... channel: ', _channel6, 'markers list: ', markerList);
|
|
12218
12233
|
if (!_channel6) {
|
|
12219
|
-
_context.next =
|
|
12234
|
+
_context.next = 221;
|
|
12220
12235
|
break;
|
|
12221
12236
|
}
|
|
12222
|
-
_context.next =
|
|
12237
|
+
_context.next = 207;
|
|
12223
12238
|
return call(getActiveChannelId);
|
|
12224
|
-
case
|
|
12225
|
-
|
|
12239
|
+
case 207:
|
|
12240
|
+
_activeChannelId6 = _context.sent;
|
|
12226
12241
|
updateLastMessage = false;
|
|
12227
12242
|
markersMap = {};
|
|
12228
12243
|
markerList.messageIds.forEach(function (messageId) {
|
|
@@ -12239,32 +12254,32 @@ function watchForEvents() {
|
|
|
12239
12254
|
});
|
|
12240
12255
|
});
|
|
12241
12256
|
if (!updateLastMessage) {
|
|
12242
|
-
_context.next =
|
|
12257
|
+
_context.next = 216;
|
|
12243
12258
|
break;
|
|
12244
12259
|
}
|
|
12245
12260
|
lastMessage = _extends({}, _channel6.lastMessage, {
|
|
12246
12261
|
deliveryStatus: markerList.name
|
|
12247
12262
|
});
|
|
12248
12263
|
updateChannelLastMessageOnAllChannels(_channel6.id, lastMessage);
|
|
12249
|
-
_context.next =
|
|
12264
|
+
_context.next = 216;
|
|
12250
12265
|
return put(updateChannelLastMessageStatusAC(lastMessage, JSON.parse(JSON.stringify(_channel6))));
|
|
12251
|
-
case
|
|
12252
|
-
if (!(
|
|
12253
|
-
_context.next =
|
|
12266
|
+
case 216:
|
|
12267
|
+
if (!(_activeChannelId6 === channelId)) {
|
|
12268
|
+
_context.next = 220;
|
|
12254
12269
|
break;
|
|
12255
12270
|
}
|
|
12256
|
-
_context.next =
|
|
12271
|
+
_context.next = 219;
|
|
12257
12272
|
return put(updateMessagesStatusAC(markerList.name, markersMap));
|
|
12258
|
-
case
|
|
12273
|
+
case 219:
|
|
12259
12274
|
updateMarkersOnAllMessages(markersMap, markerList.name);
|
|
12260
|
-
case
|
|
12275
|
+
case 220:
|
|
12261
12276
|
updateMessageStatusOnMap(_channel6.id, {
|
|
12262
12277
|
name: markerList.name,
|
|
12263
12278
|
markersMap: markersMap
|
|
12264
12279
|
});
|
|
12265
|
-
case
|
|
12266
|
-
return _context.abrupt("break",
|
|
12267
|
-
case
|
|
12280
|
+
case 221:
|
|
12281
|
+
return _context.abrupt("break", 423);
|
|
12282
|
+
case 222:
|
|
12268
12283
|
_channel7 = args.channel, from = args.from;
|
|
12269
12284
|
if (typingUsersTimeout[from.id]) {
|
|
12270
12285
|
clearTimeout(typingUsersTimeout[from.id]);
|
|
@@ -12272,79 +12287,79 @@ function watchForEvents() {
|
|
|
12272
12287
|
typingUsersTimeout[from.id] = setTimeout(function () {
|
|
12273
12288
|
channelListener.onMemberStoppedTyping(_channel7, from);
|
|
12274
12289
|
}, 4000);
|
|
12275
|
-
_context.next =
|
|
12290
|
+
_context.next = 227;
|
|
12276
12291
|
return put(switchTypingIndicatorAC(true, _channel7.id, from));
|
|
12277
|
-
case
|
|
12278
|
-
return _context.abrupt("break",
|
|
12279
|
-
case
|
|
12292
|
+
case 227:
|
|
12293
|
+
return _context.abrupt("break", 423);
|
|
12294
|
+
case 228:
|
|
12280
12295
|
_channel8 = args.channel, _from = args.from;
|
|
12281
12296
|
if (typingUsersTimeout[_from.id]) {
|
|
12282
12297
|
clearTimeout(typingUsersTimeout[_from.id]);
|
|
12283
12298
|
}
|
|
12284
|
-
_context.next =
|
|
12299
|
+
_context.next = 232;
|
|
12285
12300
|
return put(switchTypingIndicatorAC(false, _channel8.id, _from));
|
|
12286
|
-
case
|
|
12287
|
-
return _context.abrupt("break",
|
|
12288
|
-
case
|
|
12301
|
+
case 232:
|
|
12302
|
+
return _context.abrupt("break", 423);
|
|
12303
|
+
case 233:
|
|
12289
12304
|
_channelId = args.channelId;
|
|
12290
|
-
|
|
12305
|
+
log.info('channel DELETE ... ');
|
|
12291
12306
|
_channel9 = getChannelFromMap(_channelId);
|
|
12292
|
-
_context.next =
|
|
12307
|
+
_context.next = 238;
|
|
12293
12308
|
return put(setChannelToRemoveAC(_channel9));
|
|
12294
|
-
case
|
|
12309
|
+
case 238:
|
|
12295
12310
|
deleteChannelFromAllChannels(_channelId);
|
|
12296
|
-
return _context.abrupt("break",
|
|
12297
|
-
case
|
|
12311
|
+
return _context.abrupt("break", 423);
|
|
12312
|
+
case 240:
|
|
12298
12313
|
_channel10 = args.channel, deletedMessage = args.deletedMessage;
|
|
12299
|
-
|
|
12300
|
-
|
|
12314
|
+
_activeChannelId7 = getActiveChannelId();
|
|
12315
|
+
log.info('channel DELETE_MESSAGE ... ');
|
|
12301
12316
|
_channelExists7 = checkChannelExists(_channel10.id);
|
|
12302
|
-
if (!(_channel10.id ===
|
|
12303
|
-
_context.next =
|
|
12317
|
+
if (!(_channel10.id === _activeChannelId7)) {
|
|
12318
|
+
_context.next = 248;
|
|
12304
12319
|
break;
|
|
12305
12320
|
}
|
|
12306
12321
|
updateMessageOnAllMessages(deletedMessage.id, deletedMessage);
|
|
12307
|
-
_context.next =
|
|
12322
|
+
_context.next = 248;
|
|
12308
12323
|
return put(updateMessageAC(deletedMessage.id, deletedMessage));
|
|
12309
|
-
case
|
|
12324
|
+
case 248:
|
|
12310
12325
|
updateMessageOnMap(_channel10.id, {
|
|
12311
12326
|
messageId: deletedMessage.id,
|
|
12312
12327
|
params: deletedMessage
|
|
12313
12328
|
});
|
|
12314
12329
|
if (!_channelExists7) {
|
|
12315
|
-
_context.next =
|
|
12330
|
+
_context.next = 255;
|
|
12316
12331
|
break;
|
|
12317
12332
|
}
|
|
12318
|
-
_context.next =
|
|
12333
|
+
_context.next = 252;
|
|
12319
12334
|
return put(updateChannelDataAC(_channel10.id, {
|
|
12320
12335
|
newMessageCount: _channel10.newMessageCount,
|
|
12321
12336
|
muted: _channel10.muted,
|
|
12322
12337
|
mutedTill: _channel10.mutedTill
|
|
12323
12338
|
}));
|
|
12324
|
-
case
|
|
12339
|
+
case 252:
|
|
12325
12340
|
if (!(_channel10.lastMessage.id === deletedMessage.id)) {
|
|
12326
|
-
_context.next =
|
|
12341
|
+
_context.next = 255;
|
|
12327
12342
|
break;
|
|
12328
12343
|
}
|
|
12329
|
-
_context.next =
|
|
12344
|
+
_context.next = 255;
|
|
12330
12345
|
return put(updateChannelLastMessageAC(deletedMessage, _channel10));
|
|
12331
|
-
case
|
|
12346
|
+
case 255:
|
|
12332
12347
|
updateChannelOnAllChannels(_channel10.id, {
|
|
12333
12348
|
newMessageCount: _channel10.newMessageCount,
|
|
12334
12349
|
muted: _channel10.muted,
|
|
12335
12350
|
mutedTill: _channel10.mutedTill
|
|
12336
12351
|
}, deletedMessage);
|
|
12337
|
-
return _context.abrupt("break",
|
|
12338
|
-
case
|
|
12352
|
+
return _context.abrupt("break", 423);
|
|
12353
|
+
case 257:
|
|
12339
12354
|
_channel11 = args.channel, _message = args.message;
|
|
12340
|
-
|
|
12341
|
-
|
|
12355
|
+
log.info('channel EDIT_MESSAGE ... ', _message);
|
|
12356
|
+
_activeChannelId8 = getActiveChannelId();
|
|
12342
12357
|
_channelExists8 = checkChannelExists(_channel11.id);
|
|
12343
|
-
if (!(_channel11.id ===
|
|
12344
|
-
_context.next =
|
|
12358
|
+
if (!(_channel11.id === _activeChannelId8)) {
|
|
12359
|
+
_context.next = 265;
|
|
12345
12360
|
break;
|
|
12346
12361
|
}
|
|
12347
|
-
_context.next =
|
|
12362
|
+
_context.next = 264;
|
|
12348
12363
|
return put(updateMessageAC(_message.id, {
|
|
12349
12364
|
body: _message.body,
|
|
12350
12365
|
state: _message.state,
|
|
@@ -12353,7 +12368,7 @@ function watchForEvents() {
|
|
|
12353
12368
|
mentionedUsers: _message.mentionedUsers,
|
|
12354
12369
|
updatedAt: _message.updatedAt
|
|
12355
12370
|
}));
|
|
12356
|
-
case
|
|
12371
|
+
case 264:
|
|
12357
12372
|
updateMessageOnAllMessages(_message.id, {
|
|
12358
12373
|
body: _message.body,
|
|
12359
12374
|
state: _message.state,
|
|
@@ -12362,18 +12377,18 @@ function watchForEvents() {
|
|
|
12362
12377
|
mentionedUsers: _message.mentionedUsers,
|
|
12363
12378
|
updatedAt: _message.updatedAt
|
|
12364
12379
|
});
|
|
12365
|
-
case
|
|
12380
|
+
case 265:
|
|
12366
12381
|
if (!_channelExists8) {
|
|
12367
|
-
_context.next =
|
|
12382
|
+
_context.next = 269;
|
|
12368
12383
|
break;
|
|
12369
12384
|
}
|
|
12370
12385
|
if (!(_channel11.lastMessage.id === _message.id)) {
|
|
12371
|
-
_context.next =
|
|
12386
|
+
_context.next = 269;
|
|
12372
12387
|
break;
|
|
12373
12388
|
}
|
|
12374
|
-
_context.next =
|
|
12389
|
+
_context.next = 269;
|
|
12375
12390
|
return put(updateChannelLastMessageAC(_message, _channel11));
|
|
12376
|
-
case
|
|
12391
|
+
case 269:
|
|
12377
12392
|
if (checkChannelExistsOnMessagesMap(_channel11.id)) {
|
|
12378
12393
|
updateMessageOnMap(_channel11.id, {
|
|
12379
12394
|
messageId: _message.id,
|
|
@@ -12381,36 +12396,36 @@ function watchForEvents() {
|
|
|
12381
12396
|
});
|
|
12382
12397
|
}
|
|
12383
12398
|
updateChannelOnAllChannels(_channel11.id, {}, _message);
|
|
12384
|
-
return _context.abrupt("break",
|
|
12385
|
-
case
|
|
12399
|
+
return _context.abrupt("break", 423);
|
|
12400
|
+
case 272:
|
|
12386
12401
|
_channel12 = args.channel, user = args.user, _message2 = args.message, reaction = args.reaction;
|
|
12387
|
-
|
|
12402
|
+
log.info('channel REACTION_ADDED ... ', args);
|
|
12388
12403
|
isSelf = user.id === SceytChatClient.user.id;
|
|
12389
|
-
|
|
12390
|
-
if (!(_channel12.id ===
|
|
12391
|
-
_context.next =
|
|
12404
|
+
_activeChannelId9 = getActiveChannelId();
|
|
12405
|
+
if (!(_channel12.id === _activeChannelId9)) {
|
|
12406
|
+
_context.next = 280;
|
|
12392
12407
|
break;
|
|
12393
12408
|
}
|
|
12394
|
-
_context.next =
|
|
12409
|
+
_context.next = 279;
|
|
12395
12410
|
return put(addReactionToMessageAC(_message2, reaction, isSelf));
|
|
12396
|
-
case
|
|
12411
|
+
case 279:
|
|
12397
12412
|
addReactionOnAllMessages(_message2, reaction, true);
|
|
12398
|
-
case
|
|
12413
|
+
case 280:
|
|
12399
12414
|
if (!(_message2.user.id === SceytChatClient.user.id)) {
|
|
12400
|
-
_context.next =
|
|
12415
|
+
_context.next = 294;
|
|
12401
12416
|
break;
|
|
12402
12417
|
}
|
|
12403
12418
|
if (!(!isSelf && Notification.permission === 'granted')) {
|
|
12404
|
-
_context.next =
|
|
12419
|
+
_context.next = 289;
|
|
12405
12420
|
break;
|
|
12406
12421
|
}
|
|
12407
|
-
if (!(document.visibilityState !== 'visible' || _channel12.id !==
|
|
12408
|
-
_context.next =
|
|
12422
|
+
if (!(document.visibilityState !== 'visible' || _channel12.id !== _activeChannelId9)) {
|
|
12423
|
+
_context.next = 289;
|
|
12409
12424
|
break;
|
|
12410
12425
|
}
|
|
12411
|
-
_context.next =
|
|
12426
|
+
_context.next = 285;
|
|
12412
12427
|
return select(contactsMapSelector);
|
|
12413
|
-
case
|
|
12428
|
+
case 285:
|
|
12414
12429
|
_contactsMap = _context.sent;
|
|
12415
12430
|
_getFromContacts2 = getShowOnlyContactUsers();
|
|
12416
12431
|
_messageBody = MessageTextFormat({
|
|
@@ -12424,9 +12439,9 @@ function watchForEvents() {
|
|
|
12424
12439
|
setNotification(_messageBody, reaction.user, _channel12, reaction.key, _message2.attachments && _message2.attachments.length ? _message2.attachments.find(function (att) {
|
|
12425
12440
|
return att.type !== attachmentTypes.link;
|
|
12426
12441
|
}) : undefined);
|
|
12427
|
-
case
|
|
12442
|
+
case 289:
|
|
12428
12443
|
if (!(_channel12.newReactions && _channel12.newReactions.length)) {
|
|
12429
|
-
_context.next =
|
|
12444
|
+
_context.next = 293;
|
|
12430
12445
|
break;
|
|
12431
12446
|
}
|
|
12432
12447
|
channelUpdateParams = {
|
|
@@ -12436,9 +12451,9 @@ function watchForEvents() {
|
|
|
12436
12451
|
muted: _channel12.muted,
|
|
12437
12452
|
mutedTill: _channel12.mutedTill
|
|
12438
12453
|
};
|
|
12439
|
-
_context.next =
|
|
12454
|
+
_context.next = 293;
|
|
12440
12455
|
return put(updateChannelDataAC(_channel12.id, channelUpdateParams));
|
|
12441
|
-
case
|
|
12456
|
+
case 293:
|
|
12442
12457
|
updateChannelOnAllChannels(_channel12.id, {
|
|
12443
12458
|
userMessageReactions: _channel12.newReactions,
|
|
12444
12459
|
lastReactedMessage: _message2,
|
|
@@ -12446,77 +12461,77 @@ function watchForEvents() {
|
|
|
12446
12461
|
muted: _channel12.muted,
|
|
12447
12462
|
mutedTill: _channel12.mutedTill
|
|
12448
12463
|
});
|
|
12449
|
-
case
|
|
12464
|
+
case 294:
|
|
12450
12465
|
if (checkChannelExistsOnMessagesMap(_channel12.id)) {
|
|
12451
12466
|
addReactionToMessageOnMap(_channel12.id, _message2, reaction, true);
|
|
12452
12467
|
}
|
|
12453
|
-
return _context.abrupt("break",
|
|
12454
|
-
case
|
|
12468
|
+
return _context.abrupt("break", 423);
|
|
12469
|
+
case 296:
|
|
12455
12470
|
_channel13 = args.channel, _user = args.user, _message3 = args.message, _reaction = args.reaction;
|
|
12456
|
-
|
|
12471
|
+
log.info('channel REACTION_DELETED ... ', _channel13);
|
|
12457
12472
|
channelFromMap = getChannelFromMap(_channel13.id);
|
|
12458
12473
|
_isSelf = _user.id === SceytChatClient.user.id;
|
|
12459
|
-
|
|
12460
|
-
if (!(_channel13.id ===
|
|
12461
|
-
_context.next =
|
|
12474
|
+
_activeChannelId10 = getActiveChannelId();
|
|
12475
|
+
if (!(_channel13.id === _activeChannelId10)) {
|
|
12476
|
+
_context.next = 305;
|
|
12462
12477
|
break;
|
|
12463
12478
|
}
|
|
12464
|
-
_context.next =
|
|
12479
|
+
_context.next = 304;
|
|
12465
12480
|
return put(deleteReactionFromMessageAC(_message3, _reaction, _isSelf));
|
|
12466
|
-
case
|
|
12481
|
+
case 304:
|
|
12467
12482
|
removeReactionOnAllMessages(_message3, _reaction, true);
|
|
12468
|
-
case
|
|
12483
|
+
case 305:
|
|
12469
12484
|
_channelUpdateParams = JSON.parse(JSON.stringify(_channel13));
|
|
12470
12485
|
if (channelFromMap && channelFromMap.lastReactedMessage && channelFromMap.lastReactedMessage.id === _message3.id) {
|
|
12471
12486
|
_channelUpdateParams.lastReactedMessage = null;
|
|
12472
12487
|
}
|
|
12473
|
-
_context.next =
|
|
12488
|
+
_context.next = 309;
|
|
12474
12489
|
return put(updateChannelDataAC(_channel13.id, _channelUpdateParams));
|
|
12475
|
-
case
|
|
12490
|
+
case 309:
|
|
12476
12491
|
updateChannelOnAllChannels(_channel13.id, _channelUpdateParams);
|
|
12477
12492
|
if (checkChannelExistsOnMessagesMap(_channel13.id)) {
|
|
12478
12493
|
removeReactionToMessageOnMap(_channel13.id, _message3, _reaction, true);
|
|
12479
12494
|
}
|
|
12480
|
-
return _context.abrupt("break",
|
|
12481
|
-
case
|
|
12495
|
+
return _context.abrupt("break", 423);
|
|
12496
|
+
case 312:
|
|
12482
12497
|
_channel14 = args.channel;
|
|
12483
12498
|
if (!_channel14) {
|
|
12484
|
-
_context.next =
|
|
12499
|
+
_context.next = 318;
|
|
12485
12500
|
break;
|
|
12486
12501
|
}
|
|
12487
12502
|
_updatedChannel = JSON.parse(JSON.stringify(_channel14));
|
|
12488
|
-
_context.next =
|
|
12503
|
+
_context.next = 317;
|
|
12489
12504
|
return put(updateChannelDataAC(_channel14.id, _updatedChannel));
|
|
12490
|
-
case
|
|
12505
|
+
case 317:
|
|
12491
12506
|
updateChannelOnAllChannels(_channel14.id, _updatedChannel);
|
|
12492
|
-
case
|
|
12493
|
-
return _context.abrupt("break",
|
|
12494
|
-
case
|
|
12507
|
+
case 318:
|
|
12508
|
+
return _context.abrupt("break", 423);
|
|
12509
|
+
case 319:
|
|
12495
12510
|
_channel15 = args.channel;
|
|
12496
|
-
|
|
12497
|
-
_context.next =
|
|
12511
|
+
log.info('CLEAR_HISTORY: ', _channel15);
|
|
12512
|
+
_context.next = 323;
|
|
12498
12513
|
return call(getActiveChannelId);
|
|
12499
|
-
case
|
|
12500
|
-
|
|
12501
|
-
_context.next =
|
|
12514
|
+
case 323:
|
|
12515
|
+
_activeChannelId11 = _context.sent;
|
|
12516
|
+
_context.next = 326;
|
|
12502
12517
|
return call(checkChannelExists, _channel15.id);
|
|
12503
|
-
case
|
|
12518
|
+
case 326:
|
|
12504
12519
|
channelExist = _context.sent;
|
|
12505
|
-
if (!(_channel15.id ===
|
|
12506
|
-
_context.next =
|
|
12520
|
+
if (!(_channel15.id === _activeChannelId11)) {
|
|
12521
|
+
_context.next = 331;
|
|
12507
12522
|
break;
|
|
12508
12523
|
}
|
|
12509
|
-
_context.next =
|
|
12524
|
+
_context.next = 330;
|
|
12510
12525
|
return put(clearMessagesAC());
|
|
12511
|
-
case
|
|
12526
|
+
case 330:
|
|
12512
12527
|
removeAllMessages();
|
|
12513
|
-
case
|
|
12528
|
+
case 331:
|
|
12514
12529
|
removeMessagesFromMap(_channel15.id);
|
|
12515
12530
|
if (!channelExist) {
|
|
12516
|
-
_context.next =
|
|
12531
|
+
_context.next = 335;
|
|
12517
12532
|
break;
|
|
12518
12533
|
}
|
|
12519
|
-
_context.next =
|
|
12534
|
+
_context.next = 335;
|
|
12520
12535
|
return put(updateChannelDataAC(_channel15.id, {
|
|
12521
12536
|
lastMessage: null,
|
|
12522
12537
|
newMessageCount: 0,
|
|
@@ -12524,7 +12539,7 @@ function watchForEvents() {
|
|
|
12524
12539
|
muted: _channel15.muted,
|
|
12525
12540
|
mutedTill: _channel15.mutedTill
|
|
12526
12541
|
}));
|
|
12527
|
-
case
|
|
12542
|
+
case 335:
|
|
12528
12543
|
updateChannelOnAllChannels(_channel15.id, {
|
|
12529
12544
|
lastMessage: null,
|
|
12530
12545
|
newMessageCount: 0,
|
|
@@ -12532,182 +12547,182 @@ function watchForEvents() {
|
|
|
12532
12547
|
muted: _channel15.muted,
|
|
12533
12548
|
mutedTill: _channel15.mutedTill
|
|
12534
12549
|
});
|
|
12535
|
-
return _context.abrupt("break",
|
|
12536
|
-
case
|
|
12550
|
+
return _context.abrupt("break", 423);
|
|
12551
|
+
case 337:
|
|
12537
12552
|
_channel16 = args.channel;
|
|
12538
|
-
|
|
12539
|
-
_context.next =
|
|
12553
|
+
log.info('channel MUTE ... ');
|
|
12554
|
+
_context.next = 341;
|
|
12540
12555
|
return put(updateChannelDataAC(_channel16.id, {
|
|
12541
12556
|
muted: _channel16.muted,
|
|
12542
12557
|
mutedTill: _channel16.mutedTill
|
|
12543
12558
|
}));
|
|
12544
|
-
case
|
|
12559
|
+
case 341:
|
|
12545
12560
|
updateChannelOnAllChannels(_channel16.id, {
|
|
12546
12561
|
muted: _channel16.muted,
|
|
12547
12562
|
mutedTill: _channel16.mutedTill
|
|
12548
12563
|
});
|
|
12549
|
-
return _context.abrupt("break",
|
|
12550
|
-
case
|
|
12564
|
+
return _context.abrupt("break", 423);
|
|
12565
|
+
case 343:
|
|
12551
12566
|
_channel17 = args.channel;
|
|
12552
|
-
|
|
12553
|
-
_context.next =
|
|
12567
|
+
log.info('channel UNMUTE ... ');
|
|
12568
|
+
_context.next = 347;
|
|
12554
12569
|
return put(updateChannelDataAC(_channel17.id, {
|
|
12555
12570
|
muted: _channel17.muted,
|
|
12556
12571
|
mutedTill: _channel17.mutedTill
|
|
12557
12572
|
}));
|
|
12558
|
-
case
|
|
12573
|
+
case 347:
|
|
12559
12574
|
updateChannelOnAllChannels(_channel17.id, {
|
|
12560
12575
|
muted: _channel17.muted,
|
|
12561
12576
|
mutedTill: _channel17.mutedTill
|
|
12562
12577
|
});
|
|
12563
|
-
return _context.abrupt("break",
|
|
12564
|
-
case
|
|
12578
|
+
return _context.abrupt("break", 423);
|
|
12579
|
+
case 349:
|
|
12565
12580
|
_channel18 = args.channel;
|
|
12566
|
-
|
|
12567
|
-
_context.next =
|
|
12581
|
+
log.info('channel PINED ... ');
|
|
12582
|
+
_context.next = 353;
|
|
12568
12583
|
return put(updateChannelDataAC(_channel18.id, {
|
|
12569
12584
|
pinnedAt: _channel18.pinnedAt
|
|
12570
12585
|
}, true));
|
|
12571
|
-
case
|
|
12586
|
+
case 353:
|
|
12572
12587
|
updateChannelOnAllChannels(_channel18.id, {
|
|
12573
12588
|
pinnedAt: _channel18.pinnedAt
|
|
12574
12589
|
});
|
|
12575
|
-
return _context.abrupt("break",
|
|
12576
|
-
case
|
|
12590
|
+
return _context.abrupt("break", 423);
|
|
12591
|
+
case 355:
|
|
12577
12592
|
_channel19 = args.channel;
|
|
12578
|
-
|
|
12579
|
-
_context.next =
|
|
12593
|
+
log.info('channel UNPINED ... ');
|
|
12594
|
+
_context.next = 359;
|
|
12580
12595
|
return put(updateChannelDataAC(_channel19.id, {
|
|
12581
12596
|
pinnedAt: _channel19.pinnedAt
|
|
12582
12597
|
}, false, true));
|
|
12583
|
-
case
|
|
12598
|
+
case 359:
|
|
12584
12599
|
updateChannelOnAllChannels(_channel19.id, {
|
|
12585
12600
|
pinnedAt: _channel19.pinnedAt
|
|
12586
12601
|
});
|
|
12587
|
-
return _context.abrupt("break",
|
|
12588
|
-
case
|
|
12602
|
+
return _context.abrupt("break", 423);
|
|
12603
|
+
case 361:
|
|
12589
12604
|
_channel20 = args.channel;
|
|
12590
|
-
|
|
12591
|
-
_context.next =
|
|
12605
|
+
log.info('channel HIDE ... ');
|
|
12606
|
+
_context.next = 365;
|
|
12592
12607
|
return put(setChannelToHideAC(_channel20));
|
|
12593
|
-
case
|
|
12594
|
-
return _context.abrupt("break",
|
|
12595
|
-
case
|
|
12608
|
+
case 365:
|
|
12609
|
+
return _context.abrupt("break", 423);
|
|
12610
|
+
case 366:
|
|
12596
12611
|
_channel21 = args.channel;
|
|
12597
|
-
|
|
12598
|
-
_context.next =
|
|
12612
|
+
log.info('channel UNHIDE ... ');
|
|
12613
|
+
_context.next = 370;
|
|
12599
12614
|
return put(setChannelToUnHideAC(_channel21));
|
|
12600
|
-
case
|
|
12601
|
-
return _context.abrupt("break",
|
|
12602
|
-
case
|
|
12615
|
+
case 370:
|
|
12616
|
+
return _context.abrupt("break", 423);
|
|
12617
|
+
case 371:
|
|
12603
12618
|
_channel22 = args.channel;
|
|
12604
|
-
_context.next =
|
|
12619
|
+
_context.next = 374;
|
|
12605
12620
|
return put(updateChannelDataAC(_channel22.id, {
|
|
12606
12621
|
unread: _channel22.unread,
|
|
12607
12622
|
muted: _channel22.muted,
|
|
12608
12623
|
mutedTill: _channel22.mutedTill
|
|
12609
12624
|
}));
|
|
12610
|
-
case
|
|
12625
|
+
case 374:
|
|
12611
12626
|
_groupName5 = getChannelGroupName(_channel22);
|
|
12612
|
-
_context.next =
|
|
12627
|
+
_context.next = 377;
|
|
12613
12628
|
return put(updateSearchedChannelDataAC(_channel22.id, {
|
|
12614
12629
|
unread: _channel22.unread
|
|
12615
12630
|
}, _groupName5));
|
|
12616
|
-
case
|
|
12631
|
+
case 377:
|
|
12617
12632
|
updateChannelOnAllChannels(_channel22.id, {
|
|
12618
12633
|
unread: _channel22.unread
|
|
12619
12634
|
});
|
|
12620
|
-
return _context.abrupt("break",
|
|
12621
|
-
case
|
|
12635
|
+
return _context.abrupt("break", 423);
|
|
12636
|
+
case 379:
|
|
12622
12637
|
_channel23 = args.channel;
|
|
12623
|
-
_context.next =
|
|
12638
|
+
_context.next = 382;
|
|
12624
12639
|
return put(updateChannelDataAC(_channel23.id, {
|
|
12625
12640
|
unread: _channel23.unread,
|
|
12626
12641
|
muted: _channel23.muted,
|
|
12627
12642
|
mutedTill: _channel23.mutedTill
|
|
12628
12643
|
}));
|
|
12629
|
-
case
|
|
12644
|
+
case 382:
|
|
12630
12645
|
_groupName6 = getChannelGroupName(_channel23);
|
|
12631
|
-
_context.next =
|
|
12646
|
+
_context.next = 385;
|
|
12632
12647
|
return put(updateSearchedChannelDataAC(_channel23.id, {
|
|
12633
12648
|
unread: _channel23.unread
|
|
12634
12649
|
}, _groupName6));
|
|
12635
|
-
case
|
|
12650
|
+
case 385:
|
|
12636
12651
|
updateChannelOnAllChannels(_channel23.id, {
|
|
12637
12652
|
unread: _channel23.unread
|
|
12638
12653
|
});
|
|
12639
|
-
return _context.abrupt("break",
|
|
12640
|
-
case
|
|
12654
|
+
return _context.abrupt("break", 423);
|
|
12655
|
+
case 387:
|
|
12641
12656
|
_channel24 = args.channel, members = args.members;
|
|
12642
|
-
|
|
12643
|
-
|
|
12644
|
-
_context.next =
|
|
12657
|
+
log.info('channel CHANGE_ROLE channel ... ', _channel24);
|
|
12658
|
+
log.info('channel CHANGE_ROLE member ... ', members);
|
|
12659
|
+
_context.next = 392;
|
|
12645
12660
|
return call(getActiveChannelId);
|
|
12646
|
-
case
|
|
12647
|
-
|
|
12648
|
-
if (!(_channel24.id ===
|
|
12649
|
-
_context.next =
|
|
12661
|
+
case 392:
|
|
12662
|
+
_activeChannelId12 = _context.sent;
|
|
12663
|
+
if (!(_channel24.id === _activeChannelId12)) {
|
|
12664
|
+
_context.next = 396;
|
|
12650
12665
|
break;
|
|
12651
12666
|
}
|
|
12652
|
-
_context.next =
|
|
12667
|
+
_context.next = 396;
|
|
12653
12668
|
return put(updateMembersAC(members));
|
|
12654
|
-
case
|
|
12669
|
+
case 396:
|
|
12655
12670
|
i = 0;
|
|
12656
|
-
case
|
|
12671
|
+
case 397:
|
|
12657
12672
|
if (!(i < members.length)) {
|
|
12658
|
-
_context.next =
|
|
12673
|
+
_context.next = 405;
|
|
12659
12674
|
break;
|
|
12660
12675
|
}
|
|
12661
12676
|
if (!(members[i].id === SceytChatClient.user.id)) {
|
|
12662
|
-
_context.next =
|
|
12677
|
+
_context.next = 402;
|
|
12663
12678
|
break;
|
|
12664
12679
|
}
|
|
12665
|
-
_context.next =
|
|
12680
|
+
_context.next = 401;
|
|
12666
12681
|
return put(updateChannelDataAC(_channel24.id, {
|
|
12667
12682
|
userRole: members[i].role,
|
|
12668
12683
|
muted: _channel24.muted,
|
|
12669
12684
|
mutedTill: _channel24.mutedTill
|
|
12670
12685
|
}));
|
|
12671
|
-
case
|
|
12686
|
+
case 401:
|
|
12672
12687
|
updateChannelOnAllChannels(_channel24.id, {
|
|
12673
12688
|
userRole: members[i].role,
|
|
12674
12689
|
muted: _channel24.muted,
|
|
12675
12690
|
mutedTill: _channel24.mutedTill
|
|
12676
12691
|
});
|
|
12677
|
-
case
|
|
12692
|
+
case 402:
|
|
12678
12693
|
i++;
|
|
12679
|
-
_context.next =
|
|
12694
|
+
_context.next = 397;
|
|
12680
12695
|
break;
|
|
12681
|
-
case
|
|
12682
|
-
return _context.abrupt("break",
|
|
12683
|
-
case
|
|
12696
|
+
case 405:
|
|
12697
|
+
return _context.abrupt("break", 423);
|
|
12698
|
+
case 406:
|
|
12684
12699
|
_channel25 = args.channel;
|
|
12685
|
-
|
|
12686
|
-
return _context.abrupt("break",
|
|
12687
|
-
case
|
|
12700
|
+
log.info('channel frozen channel ... ', _channel25);
|
|
12701
|
+
return _context.abrupt("break", 423);
|
|
12702
|
+
case 409:
|
|
12688
12703
|
_channel26 = args.channel;
|
|
12689
|
-
|
|
12690
|
-
return _context.abrupt("break",
|
|
12691
|
-
case
|
|
12692
|
-
|
|
12693
|
-
return _context.abrupt("break",
|
|
12694
|
-
case
|
|
12704
|
+
log.info('channel unfrozen channel ... ', _channel26);
|
|
12705
|
+
return _context.abrupt("break", 423);
|
|
12706
|
+
case 412:
|
|
12707
|
+
log.info('channel event received >>>... . . . . . ', args);
|
|
12708
|
+
return _context.abrupt("break", 423);
|
|
12709
|
+
case 414:
|
|
12695
12710
|
status = args.status;
|
|
12696
|
-
|
|
12697
|
-
_context.next =
|
|
12711
|
+
log.info('connection status changed . . . . . ', status);
|
|
12712
|
+
_context.next = 418;
|
|
12698
12713
|
return put(setConnectionStatusAC(status));
|
|
12699
|
-
case
|
|
12714
|
+
case 418:
|
|
12700
12715
|
if (!(status === CONNECTION_STATUS.CONNECTED)) {
|
|
12701
|
-
_context.next =
|
|
12716
|
+
_context.next = 421;
|
|
12702
12717
|
break;
|
|
12703
12718
|
}
|
|
12704
|
-
_context.next =
|
|
12719
|
+
_context.next = 421;
|
|
12705
12720
|
return put(getRolesAC());
|
|
12706
|
-
case
|
|
12707
|
-
return _context.abrupt("break",
|
|
12708
|
-
case
|
|
12721
|
+
case 421:
|
|
12722
|
+
return _context.abrupt("break", 423);
|
|
12723
|
+
case 422:
|
|
12709
12724
|
console.warn('UNHANDLED EVENT FROM REDUX-SAGA EVENT-CHANNEL');
|
|
12710
|
-
case
|
|
12725
|
+
case 423:
|
|
12711
12726
|
case "end":
|
|
12712
12727
|
return _context.stop();
|
|
12713
12728
|
}
|
|
@@ -12845,7 +12860,7 @@ function createChannel(action) {
|
|
|
12845
12860
|
fileToUpload = {
|
|
12846
12861
|
data: createChannelData.avatarFile,
|
|
12847
12862
|
progress: function progress(progressPercent) {
|
|
12848
|
-
|
|
12863
|
+
log.info('upload percent - ', progressPercent);
|
|
12849
12864
|
}
|
|
12850
12865
|
};
|
|
12851
12866
|
_context.next = 9;
|
|
@@ -13000,7 +13015,7 @@ function createChannel(action) {
|
|
|
13000
13015
|
case 53:
|
|
13001
13016
|
_context.prev = 53;
|
|
13002
13017
|
_context.t0 = _context["catch"](0);
|
|
13003
|
-
|
|
13018
|
+
log.info(_context.t0, 'Error on create channel');
|
|
13004
13019
|
case 56:
|
|
13005
13020
|
case "end":
|
|
13006
13021
|
return _context.stop();
|
|
@@ -13087,7 +13102,7 @@ function getChannels(action) {
|
|
|
13087
13102
|
channelMessageMap[channel.id] = messages[0];
|
|
13088
13103
|
resolve(true);
|
|
13089
13104
|
})["catch"](function (e) {
|
|
13090
|
-
|
|
13105
|
+
log.info(e, 'Error on getMessagesById');
|
|
13091
13106
|
resolve(true);
|
|
13092
13107
|
});
|
|
13093
13108
|
}));
|
|
@@ -13166,7 +13181,7 @@ function getChannels(action) {
|
|
|
13166
13181
|
case 79:
|
|
13167
13182
|
_context2.prev = 79;
|
|
13168
13183
|
_context2.t1 = _context2["catch"](70);
|
|
13169
|
-
|
|
13184
|
+
log.info(_context2.t1, 'Error on get all channels');
|
|
13170
13185
|
case 82:
|
|
13171
13186
|
i++;
|
|
13172
13187
|
_context2.next = 68;
|
|
@@ -13177,7 +13192,7 @@ function getChannels(action) {
|
|
|
13177
13192
|
case 87:
|
|
13178
13193
|
_context2.prev = 87;
|
|
13179
13194
|
_context2.t2 = _context2["catch"](0);
|
|
13180
|
-
|
|
13195
|
+
log.info(_context2.t2, 'Error on get channels');
|
|
13181
13196
|
case 91:
|
|
13182
13197
|
case "end":
|
|
13183
13198
|
return _context2.stop();
|
|
@@ -13192,7 +13207,7 @@ function searchChannels(action) {
|
|
|
13192
13207
|
_context3.prev = 0;
|
|
13193
13208
|
payload = action.payload;
|
|
13194
13209
|
params = payload.params, contactsMap = payload.contactsMap;
|
|
13195
|
-
|
|
13210
|
+
log.info('search channel payload: ', payload);
|
|
13196
13211
|
SceytChatClient = getClient();
|
|
13197
13212
|
getFromContacts = getShowOnlyContactUsers();
|
|
13198
13213
|
_context3.next = 8;
|
|
@@ -13294,7 +13309,7 @@ function searchChannels(action) {
|
|
|
13294
13309
|
case 44:
|
|
13295
13310
|
_context3.prev = 44;
|
|
13296
13311
|
_context3.t0 = _context3["catch"](0);
|
|
13297
|
-
|
|
13312
|
+
log.info(_context3.t0, 'Error on get channels');
|
|
13298
13313
|
case 48:
|
|
13299
13314
|
case "end":
|
|
13300
13315
|
return _context3.stop();
|
|
@@ -13354,7 +13369,7 @@ function getChannelsForForward() {
|
|
|
13354
13369
|
case 29:
|
|
13355
13370
|
_context4.prev = 29;
|
|
13356
13371
|
_context4.t0 = _context4["catch"](0);
|
|
13357
|
-
|
|
13372
|
+
log.info(_context4.t0, 'Error on get for forward channels');
|
|
13358
13373
|
case 33:
|
|
13359
13374
|
case "end":
|
|
13360
13375
|
return _context4.stop();
|
|
@@ -13470,7 +13485,7 @@ function searchChannelsForForward(action) {
|
|
|
13470
13485
|
case 43:
|
|
13471
13486
|
_context5.prev = 43;
|
|
13472
13487
|
_context5.t0 = _context5["catch"](0);
|
|
13473
|
-
|
|
13488
|
+
log.info(_context5.t0, 'Error on get channels');
|
|
13474
13489
|
case 47:
|
|
13475
13490
|
case "end":
|
|
13476
13491
|
return _context5.stop();
|
|
@@ -13520,7 +13535,7 @@ function channelsLoadMore(action) {
|
|
|
13520
13535
|
channelMessageMap[channel.id] = messages[0];
|
|
13521
13536
|
resolve(true);
|
|
13522
13537
|
})["catch"](function (e) {
|
|
13523
|
-
|
|
13538
|
+
log.info(e, 'Error on getMessagesById');
|
|
13524
13539
|
resolve(true);
|
|
13525
13540
|
});
|
|
13526
13541
|
}));
|
|
@@ -13551,7 +13566,7 @@ function channelsLoadMore(action) {
|
|
|
13551
13566
|
case 28:
|
|
13552
13567
|
_context6.prev = 28;
|
|
13553
13568
|
_context6.t0 = _context6["catch"](0);
|
|
13554
|
-
|
|
13569
|
+
log.info(_context6.t0, 'Error in load more channels');
|
|
13555
13570
|
case 31:
|
|
13556
13571
|
case "end":
|
|
13557
13572
|
return _context6.stop();
|
|
@@ -13602,7 +13617,7 @@ function channelsForForwardLoadMore(action) {
|
|
|
13602
13617
|
case 24:
|
|
13603
13618
|
_context7.prev = 24;
|
|
13604
13619
|
_context7.t0 = _context7["catch"](0);
|
|
13605
|
-
|
|
13620
|
+
log.info(_context7.t0, 'Error in load more channels for forward');
|
|
13606
13621
|
case 27:
|
|
13607
13622
|
case "end":
|
|
13608
13623
|
return _context7.stop();
|
|
@@ -13676,7 +13691,7 @@ function markMessagesRead(action) {
|
|
|
13676
13691
|
case 26:
|
|
13677
13692
|
_context8.prev = 26;
|
|
13678
13693
|
_context8.t0 = _context8["catch"](5);
|
|
13679
|
-
|
|
13694
|
+
log.info(_context8.t0, 'Error on mark messages read');
|
|
13680
13695
|
case 29:
|
|
13681
13696
|
case "end":
|
|
13682
13697
|
return _context8.stop();
|
|
@@ -13705,7 +13720,7 @@ function markMessagesDelivered(action) {
|
|
|
13705
13720
|
_context9.next = 11;
|
|
13706
13721
|
break;
|
|
13707
13722
|
}
|
|
13708
|
-
|
|
13723
|
+
log.info('send delivered marker ', messageIds);
|
|
13709
13724
|
_context9.next = 11;
|
|
13710
13725
|
return call(channel.markMessagesAsReceived, messageIds);
|
|
13711
13726
|
case 11:
|
|
@@ -13714,7 +13729,7 @@ function markMessagesDelivered(action) {
|
|
|
13714
13729
|
case 13:
|
|
13715
13730
|
_context9.prev = 13;
|
|
13716
13731
|
_context9.t0 = _context9["catch"](2);
|
|
13717
|
-
|
|
13732
|
+
log.info(_context9.t0, 'Error on mark messages delivered');
|
|
13718
13733
|
case 16:
|
|
13719
13734
|
case "end":
|
|
13720
13735
|
return _context9.stop();
|
|
@@ -13796,7 +13811,7 @@ function switchChannel(action) {
|
|
|
13796
13811
|
case 44:
|
|
13797
13812
|
_context10.prev = 44;
|
|
13798
13813
|
_context10.t0 = _context10["catch"](0);
|
|
13799
|
-
|
|
13814
|
+
log.info('error in switch channel');
|
|
13800
13815
|
case 47:
|
|
13801
13816
|
case "end":
|
|
13802
13817
|
return _context10.stop();
|
|
@@ -13837,7 +13852,7 @@ function notificationsTurnOff(action) {
|
|
|
13837
13852
|
case 16:
|
|
13838
13853
|
_context11.prev = 16;
|
|
13839
13854
|
_context11.t0 = _context11["catch"](7);
|
|
13840
|
-
|
|
13855
|
+
log.info('ERROR turn off notifications', _context11.t0.message);
|
|
13841
13856
|
case 19:
|
|
13842
13857
|
case "end":
|
|
13843
13858
|
return _context11.stop();
|
|
@@ -13877,7 +13892,7 @@ function notificationsTurnOn() {
|
|
|
13877
13892
|
case 15:
|
|
13878
13893
|
_context12.prev = 15;
|
|
13879
13894
|
_context12.t0 = _context12["catch"](6);
|
|
13880
|
-
|
|
13895
|
+
log.info('ERROR turn on notifications: ', _context12.t0.message);
|
|
13881
13896
|
case 18:
|
|
13882
13897
|
case "end":
|
|
13883
13898
|
return _context12.stop();
|
|
@@ -13915,7 +13930,7 @@ function markChannelAsRead(action) {
|
|
|
13915
13930
|
case 14:
|
|
13916
13931
|
_context13.prev = 14;
|
|
13917
13932
|
_context13.t0 = _context13["catch"](0);
|
|
13918
|
-
|
|
13933
|
+
log.info(_context13.t0, 'Error in set channel unread');
|
|
13919
13934
|
case 17:
|
|
13920
13935
|
case "end":
|
|
13921
13936
|
return _context13.stop();
|
|
@@ -13952,7 +13967,7 @@ function markChannelAsUnRead(action) {
|
|
|
13952
13967
|
case 13:
|
|
13953
13968
|
_context14.prev = 13;
|
|
13954
13969
|
_context14.t0 = _context14["catch"](0);
|
|
13955
|
-
|
|
13970
|
+
log.info(_context14.t0, 'Error in set channel unread');
|
|
13956
13971
|
case 16:
|
|
13957
13972
|
case "end":
|
|
13958
13973
|
return _context14.stop();
|
|
@@ -13990,7 +14005,7 @@ function pinChannel(action) {
|
|
|
13990
14005
|
case 14:
|
|
13991
14006
|
_context15.prev = 14;
|
|
13992
14007
|
_context15.t0 = _context15["catch"](0);
|
|
13993
|
-
|
|
14008
|
+
log.info(_context15.t0, 'Error in pinChannel');
|
|
13994
14009
|
case 17:
|
|
13995
14010
|
case "end":
|
|
13996
14011
|
return _context15.stop();
|
|
@@ -14028,7 +14043,7 @@ function unpinChannel(action) {
|
|
|
14028
14043
|
case 14:
|
|
14029
14044
|
_context16.prev = 14;
|
|
14030
14045
|
_context16.t0 = _context16["catch"](0);
|
|
14031
|
-
|
|
14046
|
+
log.info(_context16.t0, 'Error in unpinChannel');
|
|
14032
14047
|
case 17:
|
|
14033
14048
|
case "end":
|
|
14034
14049
|
return _context16.stop();
|
|
@@ -14094,11 +14109,11 @@ function leaveChannel(action) {
|
|
|
14094
14109
|
messageBuilder = channel.createMessageBuilder();
|
|
14095
14110
|
messageBuilder.setBody('LG').setType('system').setDisplayCount(0).setSilent(true);
|
|
14096
14111
|
messageToSend = messageBuilder.create();
|
|
14097
|
-
|
|
14112
|
+
log.info('send message for left');
|
|
14098
14113
|
_context18.next = 16;
|
|
14099
14114
|
return call(channel.sendMessage, messageToSend);
|
|
14100
14115
|
case 16:
|
|
14101
|
-
|
|
14116
|
+
log.info('leave');
|
|
14102
14117
|
_context18.next = 19;
|
|
14103
14118
|
return call(channel.leave);
|
|
14104
14119
|
case 19:
|
|
@@ -14114,7 +14129,7 @@ function leaveChannel(action) {
|
|
|
14114
14129
|
case 26:
|
|
14115
14130
|
_context18.prev = 26;
|
|
14116
14131
|
_context18.t0 = _context18["catch"](0);
|
|
14117
|
-
|
|
14132
|
+
log.info('ERROR in leave channel - ', _context18.t0.message);
|
|
14118
14133
|
case 29:
|
|
14119
14134
|
case "end":
|
|
14120
14135
|
return _context18.stop();
|
|
@@ -14157,7 +14172,7 @@ function deleteChannel(action) {
|
|
|
14157
14172
|
case 18:
|
|
14158
14173
|
_context19.prev = 18;
|
|
14159
14174
|
_context19.t0 = _context19["catch"](0);
|
|
14160
|
-
|
|
14175
|
+
log.info('ERROR in delete channel');
|
|
14161
14176
|
case 21:
|
|
14162
14177
|
case "end":
|
|
14163
14178
|
return _context19.stop();
|
|
@@ -14197,7 +14212,7 @@ function blockChannel(action) {
|
|
|
14197
14212
|
case 16:
|
|
14198
14213
|
_context20.prev = 16;
|
|
14199
14214
|
_context20.t0 = _context20["catch"](0);
|
|
14200
|
-
|
|
14215
|
+
log.info('ERROR in block channel - ', _context20.t0.message);
|
|
14201
14216
|
case 19:
|
|
14202
14217
|
case "end":
|
|
14203
14218
|
return _context20.stop();
|
|
@@ -14233,7 +14248,7 @@ function updateChannel(action) {
|
|
|
14233
14248
|
fileToUpload = {
|
|
14234
14249
|
data: config.avatar,
|
|
14235
14250
|
progress: function progress(progressPercent) {
|
|
14236
|
-
|
|
14251
|
+
log.info('upload percent - ', progressPercent);
|
|
14237
14252
|
}
|
|
14238
14253
|
};
|
|
14239
14254
|
_context21.next = 13;
|
|
@@ -14274,7 +14289,7 @@ function updateChannel(action) {
|
|
|
14274
14289
|
case 28:
|
|
14275
14290
|
_context21.prev = 28;
|
|
14276
14291
|
_context21.t0 = _context21["catch"](0);
|
|
14277
|
-
|
|
14292
|
+
log.info('ERROR in update channel', _context21.t0.message);
|
|
14278
14293
|
case 31:
|
|
14279
14294
|
case "end":
|
|
14280
14295
|
return _context21.stop();
|
|
@@ -14321,7 +14336,7 @@ function checkUsersStatus() {
|
|
|
14321
14336
|
case 19:
|
|
14322
14337
|
_context22.prev = 19;
|
|
14323
14338
|
_context22.t0 = _context22["catch"](0);
|
|
14324
|
-
|
|
14339
|
+
log.info('ERROR in check user status : ', _context22.t0.message);
|
|
14325
14340
|
case 22:
|
|
14326
14341
|
case "end":
|
|
14327
14342
|
return _context22.stop();
|
|
@@ -14365,7 +14380,7 @@ function sendTyping(action) {
|
|
|
14365
14380
|
case 18:
|
|
14366
14381
|
_context23.prev = 18;
|
|
14367
14382
|
_context23.t0 = _context23["catch"](7);
|
|
14368
|
-
|
|
14383
|
+
log.info('ERROR in send typing', _context23.t0);
|
|
14369
14384
|
case 21:
|
|
14370
14385
|
case "end":
|
|
14371
14386
|
return _context23.stop();
|
|
@@ -14433,7 +14448,7 @@ function clearHistory(action) {
|
|
|
14433
14448
|
case 27:
|
|
14434
14449
|
_context24.prev = 27;
|
|
14435
14450
|
_context24.t0 = _context24["catch"](0);
|
|
14436
|
-
|
|
14451
|
+
log.info('ERROR in clear history');
|
|
14437
14452
|
case 30:
|
|
14438
14453
|
case "end":
|
|
14439
14454
|
return _context24.stop();
|
|
@@ -14504,7 +14519,7 @@ function deleteAllMessages(action) {
|
|
|
14504
14519
|
case 28:
|
|
14505
14520
|
_context25.prev = 28;
|
|
14506
14521
|
_context25.t0 = _context25["catch"](0);
|
|
14507
|
-
|
|
14522
|
+
log.info('ERROR in clear history');
|
|
14508
14523
|
case 31:
|
|
14509
14524
|
case "end":
|
|
14510
14525
|
return _context25.stop();
|
|
@@ -14558,7 +14573,7 @@ function joinChannel(action) {
|
|
|
14558
14573
|
case 26:
|
|
14559
14574
|
_context26.prev = 26;
|
|
14560
14575
|
_context26.t0 = _context26["catch"](0);
|
|
14561
|
-
|
|
14576
|
+
log.info(_context26.t0, 'Error in join to channel');
|
|
14562
14577
|
case 29:
|
|
14563
14578
|
case "end":
|
|
14564
14579
|
return _context26.stop();
|
|
@@ -14893,7 +14908,7 @@ function resizeImage(file, maxWidth, maxHeight, quality) {
|
|
|
14893
14908
|
img.src = blobURL;
|
|
14894
14909
|
img.onerror = function () {
|
|
14895
14910
|
URL.revokeObjectURL(this.src);
|
|
14896
|
-
|
|
14911
|
+
log.info('Cannot load image');
|
|
14897
14912
|
};
|
|
14898
14913
|
img.onload = function () {
|
|
14899
14914
|
URL.revokeObjectURL(this.src);
|
|
@@ -14941,7 +14956,7 @@ function createImageThumbnail(file, path, maxWidth, maxHeight) {
|
|
|
14941
14956
|
img.src = blobURL || path || '';
|
|
14942
14957
|
img.onerror = function () {
|
|
14943
14958
|
URL.revokeObjectURL(this.src);
|
|
14944
|
-
|
|
14959
|
+
log.info('Cannot load image');
|
|
14945
14960
|
};
|
|
14946
14961
|
img.onload = function () {
|
|
14947
14962
|
if (blobURL) {
|
|
@@ -14996,7 +15011,7 @@ function calculateSize(width, height, maxWidth, maxHeight) {
|
|
|
14996
15011
|
var currentVersion = 1;
|
|
14997
15012
|
var _setDataToDB = function setDataToDB(dbName, storeName, data, keyPath) {
|
|
14998
15013
|
if (!('indexedDB' in window)) {
|
|
14999
|
-
|
|
15014
|
+
log.info("This browser doesn't support IndexedDB");
|
|
15000
15015
|
} else {
|
|
15001
15016
|
var openRequest = indexedDB.open(dbName, currentVersion);
|
|
15002
15017
|
openRequest.onupgradeneeded = function () {
|
|
@@ -15059,7 +15074,7 @@ var _getDataFromDB = function getDataFromDB(dbName, storeName, keyPath, keyPatNa
|
|
|
15059
15074
|
db.close();
|
|
15060
15075
|
resolve(result);
|
|
15061
15076
|
} else {
|
|
15062
|
-
|
|
15077
|
+
log.info('No data found for the specified keyPathValue.');
|
|
15063
15078
|
db.close();
|
|
15064
15079
|
resolve('');
|
|
15065
15080
|
}
|
|
@@ -15086,7 +15101,7 @@ var addData = function addData(db, storeName, keyPath, data) {
|
|
|
15086
15101
|
var request = channelObjectStore.put(value);
|
|
15087
15102
|
request.onsuccess = function () {};
|
|
15088
15103
|
request.onerror = function () {
|
|
15089
|
-
|
|
15104
|
+
log.info('Error on put channel to db .. ', request.error);
|
|
15090
15105
|
};
|
|
15091
15106
|
});
|
|
15092
15107
|
};
|
|
@@ -15096,10 +15111,10 @@ var addData = function addData(db, storeName, keyPath, data) {
|
|
|
15096
15111
|
data.forEach(function (value) {
|
|
15097
15112
|
var request = store.put(value);
|
|
15098
15113
|
request.onsuccess = function () {
|
|
15099
|
-
|
|
15114
|
+
log.info('data added to db.. ', request.result);
|
|
15100
15115
|
};
|
|
15101
15116
|
request.onerror = function () {
|
|
15102
|
-
|
|
15117
|
+
log.info('Error on put channel to db .. ', request.error);
|
|
15103
15118
|
};
|
|
15104
15119
|
});
|
|
15105
15120
|
}
|
|
@@ -15357,7 +15372,7 @@ function sendMessage(action) {
|
|
|
15357
15372
|
};
|
|
15358
15373
|
messageAttachment.completion = function (updatedAttachment, error) {
|
|
15359
15374
|
if (error) {
|
|
15360
|
-
|
|
15375
|
+
log.info('fail to upload attachment ... ', error);
|
|
15361
15376
|
store.dispatch({
|
|
15362
15377
|
type: UPLOAD_ATTACHMENT_COMPILATION,
|
|
15363
15378
|
payload: {
|
|
@@ -15585,7 +15600,7 @@ function sendMessage(action) {
|
|
|
15585
15600
|
});
|
|
15586
15601
|
attachmentsToUpdate = messageResponse.attachments.map(function (attachment) {
|
|
15587
15602
|
if (currentAttachmentsMap[attachment.tid]) {
|
|
15588
|
-
|
|
15603
|
+
log.info('set at');
|
|
15589
15604
|
return _extends({}, attachment, {
|
|
15590
15605
|
attachmentUrl: currentAttachmentsMap[attachment.tid].attachmentUrl
|
|
15591
15606
|
});
|
|
@@ -15643,7 +15658,7 @@ function sendMessage(action) {
|
|
|
15643
15658
|
case 49:
|
|
15644
15659
|
_context2.prev = 49;
|
|
15645
15660
|
_context2.t0 = _context2["catch"](2);
|
|
15646
|
-
|
|
15661
|
+
log.info('Error on uploading attachment', message.tid, _context2.t0);
|
|
15647
15662
|
_context2.next = 54;
|
|
15648
15663
|
return put(updateAttachmentUploadingStateAC(UPLOAD_STATE.FAIL, message.tid));
|
|
15649
15664
|
case 54:
|
|
@@ -15683,7 +15698,7 @@ function sendMessage(action) {
|
|
|
15683
15698
|
case 80:
|
|
15684
15699
|
_context3.prev = 80;
|
|
15685
15700
|
_context3.t2 = _context3["catch"](2);
|
|
15686
|
-
|
|
15701
|
+
log.info('error on send message ... ', _context3.t2);
|
|
15687
15702
|
case 83:
|
|
15688
15703
|
case "end":
|
|
15689
15704
|
return _context3.stop();
|
|
@@ -15865,7 +15880,7 @@ function sendTextMessage(action) {
|
|
|
15865
15880
|
case 82:
|
|
15866
15881
|
_context4.prev = 82;
|
|
15867
15882
|
_context4.t0 = _context4["catch"](8);
|
|
15868
|
-
|
|
15883
|
+
log.info('error on send text message ... ', _context4.t0);
|
|
15869
15884
|
updateMessageOnMap(channel.id, {
|
|
15870
15885
|
messageId: sendMessageTid,
|
|
15871
15886
|
params: {
|
|
@@ -16060,7 +16075,7 @@ function forwardMessage(action) {
|
|
|
16060
16075
|
case 73:
|
|
16061
16076
|
_context5.prev = 73;
|
|
16062
16077
|
_context5.t0 = _context5["catch"](0);
|
|
16063
|
-
|
|
16078
|
+
log.info('error on forward message ... ', _context5.t0);
|
|
16064
16079
|
case 76:
|
|
16065
16080
|
_context5.next = 78;
|
|
16066
16081
|
return put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
@@ -16085,7 +16100,7 @@ function resendMessage(action) {
|
|
|
16085
16100
|
case 6:
|
|
16086
16101
|
channel = _context6.sent;
|
|
16087
16102
|
_context6.prev = 7;
|
|
16088
|
-
|
|
16103
|
+
log.info('resend message .... ', message);
|
|
16089
16104
|
if (!channel) {
|
|
16090
16105
|
channel = getChannelFromAllChannels(channelId);
|
|
16091
16106
|
if (channel) {
|
|
@@ -16122,7 +16137,7 @@ function resendMessage(action) {
|
|
|
16122
16137
|
messageCopy = _extends({}, message, {
|
|
16123
16138
|
attachments: [messageAttachment]
|
|
16124
16139
|
});
|
|
16125
|
-
|
|
16140
|
+
log.info('attachmentCompilation. .. . .', attachmentCompilation);
|
|
16126
16141
|
if (!(connectionState === CONNECTION_STATUS.CONNECTED && attachmentCompilation[messageAttachment.tid] && attachmentCompilation[messageAttachment.tid] === UPLOAD_STATE.FAIL)) {
|
|
16127
16142
|
_context6.next = 94;
|
|
16128
16143
|
break;
|
|
@@ -16137,7 +16152,7 @@ function resendMessage(action) {
|
|
|
16137
16152
|
handleUploadProgress = function handleUploadProgress(_ref2) {
|
|
16138
16153
|
var loaded = _ref2.loaded,
|
|
16139
16154
|
total = _ref2.total;
|
|
16140
|
-
|
|
16155
|
+
log.info('progress ... ', loaded / total);
|
|
16141
16156
|
};
|
|
16142
16157
|
_context6.prev = 29;
|
|
16143
16158
|
handleUpdateLocalPath = function handleUpdateLocalPath(updatedLink) {
|
|
@@ -16159,7 +16174,7 @@ function resendMessage(action) {
|
|
|
16159
16174
|
});
|
|
16160
16175
|
};
|
|
16161
16176
|
pendingAttachment = getPendingAttachment(message.attachments[0].tid);
|
|
16162
|
-
|
|
16177
|
+
log.info('pendingAttachment ... ', pendingAttachment);
|
|
16163
16178
|
if (!messageAttachment.cachedUrl) {
|
|
16164
16179
|
_context6.next = 37;
|
|
16165
16180
|
break;
|
|
@@ -16175,14 +16190,14 @@ function resendMessage(action) {
|
|
|
16175
16190
|
case 41:
|
|
16176
16191
|
uri = _context6.sent;
|
|
16177
16192
|
case 42:
|
|
16178
|
-
|
|
16193
|
+
log.info('messageAttachment ... ', messageAttachment);
|
|
16179
16194
|
_context6.next = 45;
|
|
16180
16195
|
return put(updateAttachmentUploadingStateAC(UPLOAD_STATE.SUCCESS, messageAttachment.tid));
|
|
16181
16196
|
case 45:
|
|
16182
16197
|
delete messageCopy.createdAt;
|
|
16183
16198
|
_thumbnailMetas = {};
|
|
16184
16199
|
fileSize = messageAttachment.cachedUrl ? messageAttachment.size : pendingAttachment.file.size;
|
|
16185
|
-
|
|
16200
|
+
log.info('uri ... ', uri);
|
|
16186
16201
|
if (!(!messageAttachment.cachedUrl && messageAttachment.url.type.split('/')[0] === 'image')) {
|
|
16187
16202
|
_context6.next = 56;
|
|
16188
16203
|
break;
|
|
@@ -16205,10 +16220,10 @@ function resendMessage(action) {
|
|
|
16205
16220
|
szh: _thumbnailMetas.imageHeight
|
|
16206
16221
|
}));
|
|
16207
16222
|
}
|
|
16208
|
-
|
|
16223
|
+
log.info('attachmentMeta ... ', attachmentMeta);
|
|
16209
16224
|
attachmentBuilder = channel.createAttachmentBuilder(uri, messageAttachment.type);
|
|
16210
16225
|
attachmentToSend = attachmentBuilder.setName(messageAttachment.name).setMetadata(attachmentMeta).setFileSize(fileSize).setUpload(false).create();
|
|
16211
|
-
|
|
16226
|
+
log.info('attachmentToSend ... ', attachmentToSend);
|
|
16212
16227
|
attachmentToSend.tid = messageAttachment.tid;
|
|
16213
16228
|
attachmentToSend.attachmentUrl = messageAttachment.attachmentUrl;
|
|
16214
16229
|
_context6.next = 65;
|
|
@@ -16269,7 +16284,7 @@ function resendMessage(action) {
|
|
|
16269
16284
|
case 85:
|
|
16270
16285
|
_context6.prev = 85;
|
|
16271
16286
|
_context6.t0 = _context6["catch"](29);
|
|
16272
|
-
|
|
16287
|
+
log.info('fail upload attachment on resend message ... ', _context6.t0);
|
|
16273
16288
|
_context6.next = 90;
|
|
16274
16289
|
return put(updateAttachmentUploadingStateAC(UPLOAD_STATE.FAIL, messageAttachment.tid));
|
|
16275
16290
|
case 90:
|
|
@@ -16294,7 +16309,7 @@ function resendMessage(action) {
|
|
|
16294
16309
|
_context6.next = 121;
|
|
16295
16310
|
break;
|
|
16296
16311
|
}
|
|
16297
|
-
|
|
16312
|
+
log.info('send failed message ...');
|
|
16298
16313
|
_messageCopy3 = _extends({}, message);
|
|
16299
16314
|
delete _messageCopy3.createdAt;
|
|
16300
16315
|
if (!(connectionState === CONNECTION_STATUS.CONNECTED)) {
|
|
@@ -16305,7 +16320,7 @@ function resendMessage(action) {
|
|
|
16305
16320
|
return call(channel.sendMessage, _messageCopy3);
|
|
16306
16321
|
case 103:
|
|
16307
16322
|
_messageResponse = _context6.sent;
|
|
16308
|
-
|
|
16323
|
+
log.info('resend message response ... ', _messageResponse);
|
|
16309
16324
|
_messageUpdateData = {
|
|
16310
16325
|
id: _messageResponse.id,
|
|
16311
16326
|
body: _messageResponse.body,
|
|
@@ -16359,7 +16374,7 @@ function resendMessage(action) {
|
|
|
16359
16374
|
case 125:
|
|
16360
16375
|
_context6.prev = 125;
|
|
16361
16376
|
_context6.t1 = _context6["catch"](7);
|
|
16362
|
-
|
|
16377
|
+
log.info('ERROR in resend message', _context6.t1.message, 'channel.. . ', channel);
|
|
16363
16378
|
_context6.next = 130;
|
|
16364
16379
|
return put(updateMessageAC(message.tid, {
|
|
16365
16380
|
state: MESSAGE_STATUS.FAILED
|
|
@@ -16405,7 +16420,7 @@ function deleteMessage(action) {
|
|
|
16405
16420
|
return call(channel.deleteMessageById, messageId, deleteOption === 'forMe');
|
|
16406
16421
|
case 9:
|
|
16407
16422
|
deletedMessage = _context7.sent;
|
|
16408
|
-
|
|
16423
|
+
log.info('deletedMessage . .. . .', deletedMessage);
|
|
16409
16424
|
_context7.next = 13;
|
|
16410
16425
|
return put(updateMessageAC(deletedMessage.id, deletedMessage));
|
|
16411
16426
|
case 13:
|
|
@@ -16428,7 +16443,7 @@ function deleteMessage(action) {
|
|
|
16428
16443
|
case 22:
|
|
16429
16444
|
_context7.prev = 22;
|
|
16430
16445
|
_context7.t0 = _context7["catch"](0);
|
|
16431
|
-
|
|
16446
|
+
log.info('ERROR in delete message', _context7.t0.message);
|
|
16432
16447
|
case 25:
|
|
16433
16448
|
case "end":
|
|
16434
16449
|
return _context7.stop();
|
|
@@ -16486,7 +16501,7 @@ function editMessage(action) {
|
|
|
16486
16501
|
case 21:
|
|
16487
16502
|
_context8.prev = 21;
|
|
16488
16503
|
_context8.t0 = _context8["catch"](0);
|
|
16489
|
-
|
|
16504
|
+
log.info('ERROR in edit message', _context8.t0.message);
|
|
16490
16505
|
case 24:
|
|
16491
16506
|
case "end":
|
|
16492
16507
|
return _context8.stop();
|
|
@@ -16600,7 +16615,7 @@ function getMessagesQuery(action) {
|
|
|
16600
16615
|
break;
|
|
16601
16616
|
case 63:
|
|
16602
16617
|
messageQuery.limit = MESSAGES_MAX_LENGTH;
|
|
16603
|
-
|
|
16618
|
+
log.info('load by message id from server ...............', messageId);
|
|
16604
16619
|
_context9.next = 67;
|
|
16605
16620
|
return call(messageQuery.loadNearMessageId, messageId);
|
|
16606
16621
|
case 67:
|
|
@@ -16623,7 +16638,7 @@ function getMessagesQuery(action) {
|
|
|
16623
16638
|
result.hasNext = _secondResult.hasNext;
|
|
16624
16639
|
messageQuery.reverse = true;
|
|
16625
16640
|
case 80:
|
|
16626
|
-
|
|
16641
|
+
log.info('result from server ....... ', result);
|
|
16627
16642
|
_context9.next = 83;
|
|
16628
16643
|
return put(setMessagesHasNextAC(true));
|
|
16629
16644
|
case 83:
|
|
@@ -16745,7 +16760,7 @@ function getMessagesQuery(action) {
|
|
|
16745
16760
|
_context9.next = 145;
|
|
16746
16761
|
return put(setMessagesAC(JSON.parse(JSON.stringify(cachedMessages))));
|
|
16747
16762
|
case 145:
|
|
16748
|
-
|
|
16763
|
+
log.info('load message from server');
|
|
16749
16764
|
_context9.next = 148;
|
|
16750
16765
|
return call(messageQuery.loadPrevious);
|
|
16751
16766
|
case 148:
|
|
@@ -16815,7 +16830,7 @@ function getMessagesQuery(action) {
|
|
|
16815
16830
|
case 177:
|
|
16816
16831
|
_context9.prev = 177;
|
|
16817
16832
|
_context9.t0 = _context9["catch"](0);
|
|
16818
|
-
|
|
16833
|
+
log.info('error in message query', _context9.t0);
|
|
16819
16834
|
case 180:
|
|
16820
16835
|
case "end":
|
|
16821
16836
|
return _context9.stop();
|
|
@@ -16830,7 +16845,7 @@ function loadMoreMessages(action) {
|
|
|
16830
16845
|
_context10.prev = 0;
|
|
16831
16846
|
payload = action.payload;
|
|
16832
16847
|
limit = payload.limit, direction = payload.direction, channelId = payload.channelId, messageId = payload.messageId, hasNext = payload.hasNext;
|
|
16833
|
-
|
|
16848
|
+
log.info('loadMoreMessages .. .. ', payload);
|
|
16834
16849
|
SceytChatClient = getClient();
|
|
16835
16850
|
messageQueryBuilder = new SceytChatClient.MessageListQueryBuilder(channelId);
|
|
16836
16851
|
messageQueryBuilder.reverse(true);
|
|
@@ -16887,13 +16902,13 @@ function loadMoreMessages(action) {
|
|
|
16887
16902
|
_context10.next = 42;
|
|
16888
16903
|
break;
|
|
16889
16904
|
}
|
|
16890
|
-
|
|
16905
|
+
log.info('saga load next from server ... ', messageId);
|
|
16891
16906
|
messageQuery.reverse = false;
|
|
16892
16907
|
_context10.next = 37;
|
|
16893
16908
|
return call(messageQuery.loadNextMessageId, messageId);
|
|
16894
16909
|
case 37:
|
|
16895
16910
|
result = _context10.sent;
|
|
16896
|
-
|
|
16911
|
+
log.info('result from server next ... ', result);
|
|
16897
16912
|
if (result.messages.length) {
|
|
16898
16913
|
addAllMessages(result.messages, MESSAGE_LOAD_DIRECTION.NEXT);
|
|
16899
16914
|
}
|
|
@@ -16924,7 +16939,7 @@ function loadMoreMessages(action) {
|
|
|
16924
16939
|
case 55:
|
|
16925
16940
|
_context10.prev = 55;
|
|
16926
16941
|
_context10.t0 = _context10["catch"](0);
|
|
16927
|
-
|
|
16942
|
+
log.info('error in load more messages', _context10.t0);
|
|
16928
16943
|
case 58:
|
|
16929
16944
|
case "end":
|
|
16930
16945
|
return _context10.stop();
|
|
@@ -16986,7 +17001,7 @@ function addReaction(action) {
|
|
|
16986
17001
|
case 28:
|
|
16987
17002
|
_context11.prev = 28;
|
|
16988
17003
|
_context11.t0 = _context11["catch"](0);
|
|
16989
|
-
|
|
17004
|
+
log.info('ERROR in add reaction', _context11.t0.message);
|
|
16990
17005
|
case 31:
|
|
16991
17006
|
case "end":
|
|
16992
17007
|
return _context11.stop();
|
|
@@ -17030,7 +17045,7 @@ function deleteReaction(action) {
|
|
|
17030
17045
|
case 16:
|
|
17031
17046
|
updateChannelOnAllChannels(channel.id, channelUpdateParam);
|
|
17032
17047
|
case 17:
|
|
17033
|
-
|
|
17048
|
+
log.info('message received. ... ', message);
|
|
17034
17049
|
_context12.next = 20;
|
|
17035
17050
|
return put(deleteReactionFromListAC(reaction));
|
|
17036
17051
|
case 20:
|
|
@@ -17044,7 +17059,7 @@ function deleteReaction(action) {
|
|
|
17044
17059
|
case 26:
|
|
17045
17060
|
_context12.prev = 26;
|
|
17046
17061
|
_context12.t0 = _context12["catch"](0);
|
|
17047
|
-
|
|
17062
|
+
log.info('ERROR in delete reaction', _context12.t0.message);
|
|
17048
17063
|
case 29:
|
|
17049
17064
|
case "end":
|
|
17050
17065
|
return _context12.stop();
|
|
@@ -17088,7 +17103,7 @@ function getReactions(action) {
|
|
|
17088
17103
|
case 22:
|
|
17089
17104
|
_context13.prev = 22;
|
|
17090
17105
|
_context13.t0 = _context13["catch"](0);
|
|
17091
|
-
|
|
17106
|
+
log.info('ERROR in get reactions', _context13.t0.message);
|
|
17092
17107
|
case 25:
|
|
17093
17108
|
case "end":
|
|
17094
17109
|
return _context13.stop();
|
|
@@ -17125,7 +17140,7 @@ function loadMoreReactions(action) {
|
|
|
17125
17140
|
case 16:
|
|
17126
17141
|
_context14.prev = 16;
|
|
17127
17142
|
_context14.t0 = _context14["catch"](0);
|
|
17128
|
-
|
|
17143
|
+
log.info('ERROR in load more reactions', _context14.t0.message);
|
|
17129
17144
|
case 19:
|
|
17130
17145
|
case "end":
|
|
17131
17146
|
return _context14.stop();
|
|
@@ -17212,7 +17227,7 @@ function getMessageAttachments(action) {
|
|
|
17212
17227
|
case 41:
|
|
17213
17228
|
_context15.prev = 41;
|
|
17214
17229
|
_context15.t0 = _context15["catch"](0);
|
|
17215
|
-
|
|
17230
|
+
log.info('error in message attachment query');
|
|
17216
17231
|
case 44:
|
|
17217
17232
|
case "end":
|
|
17218
17233
|
return _context15.stop();
|
|
@@ -17265,7 +17280,7 @@ function loadMoreMessageAttachments(action) {
|
|
|
17265
17280
|
case 24:
|
|
17266
17281
|
_context16.prev = 24;
|
|
17267
17282
|
_context16.t0 = _context16["catch"](0);
|
|
17268
|
-
|
|
17283
|
+
log.info('error in message attachment query', _context16.t0);
|
|
17269
17284
|
case 28:
|
|
17270
17285
|
case "end":
|
|
17271
17286
|
return _context16.stop();
|
|
@@ -17296,7 +17311,7 @@ function pauseAttachmentUploading(action) {
|
|
|
17296
17311
|
case 9:
|
|
17297
17312
|
_context17.prev = 9;
|
|
17298
17313
|
_context17.t0 = _context17["catch"](0);
|
|
17299
|
-
|
|
17314
|
+
log.info('error in pause attachment uploading', _context17.t0);
|
|
17300
17315
|
case 13:
|
|
17301
17316
|
case "end":
|
|
17302
17317
|
return _context17.stop();
|
|
@@ -17310,7 +17325,7 @@ function resumeAttachmentUploading(action) {
|
|
|
17310
17325
|
case 0:
|
|
17311
17326
|
_context18.prev = 0;
|
|
17312
17327
|
attachmentId = action.payload.attachmentId;
|
|
17313
|
-
|
|
17328
|
+
log.info('resume for attachment ... ', attachmentId);
|
|
17314
17329
|
if (!getCustomUploader()) {
|
|
17315
17330
|
_context18.next = 8;
|
|
17316
17331
|
break;
|
|
@@ -17328,7 +17343,7 @@ function resumeAttachmentUploading(action) {
|
|
|
17328
17343
|
case 10:
|
|
17329
17344
|
_context18.prev = 10;
|
|
17330
17345
|
_context18.t0 = _context18["catch"](0);
|
|
17331
|
-
|
|
17346
|
+
log.info('error in resume attachment uploading', _context18.t0);
|
|
17332
17347
|
case 14:
|
|
17333
17348
|
case "end":
|
|
17334
17349
|
return _context18.stop();
|
|
@@ -17437,7 +17452,7 @@ function getMembers(action) {
|
|
|
17437
17452
|
case 22:
|
|
17438
17453
|
_context.prev = 22;
|
|
17439
17454
|
_context.t0 = _context["catch"](0);
|
|
17440
|
-
|
|
17455
|
+
log.info('ERROR in get members - ', _context.t0.message);
|
|
17441
17456
|
case 26:
|
|
17442
17457
|
case "end":
|
|
17443
17458
|
return _context.stop();
|
|
@@ -17541,7 +17556,7 @@ function addMembers(action) {
|
|
|
17541
17556
|
case 24:
|
|
17542
17557
|
_context3.prev = 24;
|
|
17543
17558
|
_context3.t0 = _context3["catch"](0);
|
|
17544
|
-
|
|
17559
|
+
log.info('error on add members... ', _context3.t0);
|
|
17545
17560
|
case 27:
|
|
17546
17561
|
case "end":
|
|
17547
17562
|
return _context3.stop();
|
|
@@ -17668,7 +17683,7 @@ function changeMemberRole(action) {
|
|
|
17668
17683
|
case 13:
|
|
17669
17684
|
_context6.prev = 13;
|
|
17670
17685
|
_context6.t0 = _context6["catch"](0);
|
|
17671
|
-
|
|
17686
|
+
log.info('error in change member role');
|
|
17672
17687
|
case 16:
|
|
17673
17688
|
case "end":
|
|
17674
17689
|
return _context6.stop();
|
|
@@ -17691,7 +17706,7 @@ function reportMember(action) {
|
|
|
17691
17706
|
case 7:
|
|
17692
17707
|
_context7.prev = 7;
|
|
17693
17708
|
_context7.t0 = _context7["catch"](2);
|
|
17694
|
-
|
|
17709
|
+
log.info('ERROR report user', _context7.t0.message);
|
|
17695
17710
|
case 10:
|
|
17696
17711
|
case "end":
|
|
17697
17712
|
return _context7.stop();
|
|
@@ -17721,7 +17736,7 @@ function getRoles(action) {
|
|
|
17721
17736
|
case 12:
|
|
17722
17737
|
_context8.prev = 12;
|
|
17723
17738
|
_context8.t0 = _context8["catch"](1);
|
|
17724
|
-
|
|
17739
|
+
log.info('ERROR get roles', _context8.t0);
|
|
17725
17740
|
_context8.next = 17;
|
|
17726
17741
|
return put(getRolesFailAC((timeout || 0) + 300, (attempts || 0) + 1));
|
|
17727
17742
|
case 17:
|
|
@@ -17793,7 +17808,7 @@ function getContacts() {
|
|
|
17793
17808
|
case 11:
|
|
17794
17809
|
_context.prev = 11;
|
|
17795
17810
|
_context.t0 = _context["catch"](0);
|
|
17796
|
-
|
|
17811
|
+
log.info('ERROR in get contacts - :', _context.t0.message);
|
|
17797
17812
|
case 15:
|
|
17798
17813
|
case "end":
|
|
17799
17814
|
return _context.stop();
|
|
@@ -17855,7 +17870,7 @@ function blockUser(action) {
|
|
|
17855
17870
|
case 21:
|
|
17856
17871
|
_context2.prev = 21;
|
|
17857
17872
|
_context2.t0 = _context2["catch"](0);
|
|
17858
|
-
|
|
17873
|
+
log.info('error in block users', _context2.t0.message);
|
|
17859
17874
|
case 24:
|
|
17860
17875
|
case "end":
|
|
17861
17876
|
return _context2.stop();
|
|
@@ -17917,7 +17932,7 @@ function unblockUser(action) {
|
|
|
17917
17932
|
case 21:
|
|
17918
17933
|
_context3.prev = 21;
|
|
17919
17934
|
_context3.t0 = _context3["catch"](0);
|
|
17920
|
-
|
|
17935
|
+
log.info('error in unblock users', _context3.t0.message);
|
|
17921
17936
|
case 24:
|
|
17922
17937
|
case "end":
|
|
17923
17938
|
return _context3.stop();
|
|
@@ -17941,7 +17956,7 @@ function updateProfile(action) {
|
|
|
17941
17956
|
fileToUpload = {
|
|
17942
17957
|
data: avatarFile,
|
|
17943
17958
|
progress: function progress(progressPercent) {
|
|
17944
|
-
|
|
17959
|
+
log.info('upload percent - ', progressPercent);
|
|
17945
17960
|
}
|
|
17946
17961
|
};
|
|
17947
17962
|
_context4.next = 9;
|
|
@@ -17976,7 +17991,7 @@ function updateProfile(action) {
|
|
|
17976
17991
|
case 23:
|
|
17977
17992
|
_context4.prev = 23;
|
|
17978
17993
|
_context4.t0 = _context4["catch"](0);
|
|
17979
|
-
|
|
17994
|
+
log.info(_context4.t0, 'Error on update user');
|
|
17980
17995
|
case 26:
|
|
17981
17996
|
case "end":
|
|
17982
17997
|
return _context4.stop();
|
|
@@ -18020,7 +18035,7 @@ function getUsers(action) {
|
|
|
18020
18035
|
if (params.filter === 'username') {
|
|
18021
18036
|
usersQueryBuilder.filterByUsername();
|
|
18022
18037
|
}
|
|
18023
|
-
|
|
18038
|
+
log.info('user query params ..... ', params);
|
|
18024
18039
|
_context5.next = 17;
|
|
18025
18040
|
return call(usersQueryBuilder.build);
|
|
18026
18041
|
case 17:
|
|
@@ -18045,7 +18060,7 @@ function getUsers(action) {
|
|
|
18045
18060
|
case 31:
|
|
18046
18061
|
_context5.prev = 31;
|
|
18047
18062
|
_context5.t0 = _context5["catch"](0);
|
|
18048
|
-
|
|
18063
|
+
log.info('ERROR on get users', _context5.t0.message);
|
|
18049
18064
|
case 35:
|
|
18050
18065
|
case "end":
|
|
18051
18066
|
return _context5.stop();
|
|
@@ -18083,7 +18098,7 @@ function loadMoreUsers(action) {
|
|
|
18083
18098
|
case 17:
|
|
18084
18099
|
_context6.prev = 17;
|
|
18085
18100
|
_context6.t0 = _context6["catch"](0);
|
|
18086
|
-
|
|
18101
|
+
log.info('ERROR load more users', _context6.t0.message);
|
|
18087
18102
|
case 21:
|
|
18088
18103
|
case "end":
|
|
18089
18104
|
return _context6.stop();
|
|
@@ -18392,7 +18407,7 @@ var SceytChat = function SceytChat(_ref) {
|
|
|
18392
18407
|
colors.outgoingMessageBackgroundXDark = moderateColor(themeColors[THEME_COLORS.ACCENT].dark || '', 0.75, true);
|
|
18393
18408
|
};
|
|
18394
18409
|
useEffect(function () {
|
|
18395
|
-
|
|
18410
|
+
log.info('client is changed.... ', client);
|
|
18396
18411
|
if (client) {
|
|
18397
18412
|
setClient(client);
|
|
18398
18413
|
setSceytChatClient(client);
|
|
@@ -18471,7 +18486,7 @@ var SceytChat = function SceytChat(_ref) {
|
|
|
18471
18486
|
try {
|
|
18472
18487
|
if (window.Notification && Notification.permission === 'default') {
|
|
18473
18488
|
Promise.resolve(Notification.requestPermission()).then(function (permission) {
|
|
18474
|
-
|
|
18489
|
+
log.info('permission:', permission);
|
|
18475
18490
|
});
|
|
18476
18491
|
}
|
|
18477
18492
|
} catch (e) {
|
|
@@ -18531,7 +18546,7 @@ var SceytChat = function SceytChat(_ref) {
|
|
|
18531
18546
|
}, [openChatOnUserInteraction]);
|
|
18532
18547
|
useDidUpdate(function () {
|
|
18533
18548
|
if (getRolesFail) {
|
|
18534
|
-
|
|
18549
|
+
log.info('getRolesFail ... ', getRolesFail);
|
|
18535
18550
|
}
|
|
18536
18551
|
if (getRolesFail && getRolesFail.attempts <= 5) {
|
|
18537
18552
|
setTimeout(function () {
|
|
@@ -18580,7 +18595,12 @@ var SceytChatContainer = function SceytChatContainer(_ref) {
|
|
|
18580
18595
|
showNotifications = _ref$showNotification === void 0 ? true : _ref$showNotification,
|
|
18581
18596
|
hideUserPresence = _ref.hideUserPresence,
|
|
18582
18597
|
openChatOnUserInteraction = _ref.openChatOnUserInteraction,
|
|
18583
|
-
autoSelectFirstChannel = _ref.autoSelectFirstChannel
|
|
18598
|
+
autoSelectFirstChannel = _ref.autoSelectFirstChannel,
|
|
18599
|
+
_ref$logLevel = _ref.logLevel,
|
|
18600
|
+
logLevel = _ref$logLevel === void 0 ? 'silent' : _ref$logLevel;
|
|
18601
|
+
useEffect(function () {
|
|
18602
|
+
log.setLevel(logLevel);
|
|
18603
|
+
}, []);
|
|
18584
18604
|
return /*#__PURE__*/React__default.createElement(Provider, {
|
|
18585
18605
|
store: store
|
|
18586
18606
|
}, /*#__PURE__*/React__default.createElement(SceytChat, {
|
|
@@ -19737,7 +19757,7 @@ var UsersPopup = function UsersPopup(_ref) {
|
|
|
19737
19757
|
if (actionType === 'selectUsers' && getSelectedUsers) {
|
|
19738
19758
|
getSelectedUsers(selectedMembersList, 'create');
|
|
19739
19759
|
} else {
|
|
19740
|
-
|
|
19760
|
+
log.info('call add members ... ', selectedMembersList);
|
|
19741
19761
|
dispatch(addMembersAC(channel.id, selectedMembersList));
|
|
19742
19762
|
}
|
|
19743
19763
|
}
|
|
@@ -20603,13 +20623,13 @@ var DropDown = function DropDown(_ref) {
|
|
|
20603
20623
|
var dropDownElem = dropDownRef.current;
|
|
20604
20624
|
var dropDownBodyElem = dropDownBodyRef.current;
|
|
20605
20625
|
if (dropDownElem && !dropDownElem.contains(e.target)) {
|
|
20606
|
-
|
|
20626
|
+
log.info('call toggle dropdown. .. ');
|
|
20607
20627
|
toggleDropdown();
|
|
20608
20628
|
}
|
|
20609
20629
|
if (isSelect && dropDownBodyElem && dropDownBodyElem.contains(e.target)) {
|
|
20610
20630
|
var listElement = dropDownBodyElem.getElementsByTagName('ul')[0];
|
|
20611
20631
|
if (listElement && listElement.contains(e.target)) {
|
|
20612
|
-
|
|
20632
|
+
log.info('call toggle dropdown. .. !!');
|
|
20613
20633
|
toggleDropdown();
|
|
20614
20634
|
}
|
|
20615
20635
|
}
|
|
@@ -22227,9 +22247,9 @@ var setAttachmentToCache = function setAttachmentToCache(attachmentUrl, attachme
|
|
|
22227
22247
|
caches.open(ATTACHMENTS_CACHE).then(function (cache) {
|
|
22228
22248
|
try {
|
|
22229
22249
|
cache.put(attachmentUrl, attachmentResponse).then(function () {
|
|
22230
|
-
|
|
22250
|
+
log.info('Cache success');
|
|
22231
22251
|
})["catch"](function (e) {
|
|
22232
|
-
|
|
22252
|
+
log.info('Error on cache attachment ... ', e);
|
|
22233
22253
|
caches["delete"](attachmentUrl);
|
|
22234
22254
|
});
|
|
22235
22255
|
return Promise.resolve();
|
|
@@ -22249,7 +22269,7 @@ var getAttachmentUrlFromCache = function getAttachmentUrlFromCache(attachmentUrl
|
|
|
22249
22269
|
if (response) {
|
|
22250
22270
|
return Promise.resolve(response.blob()).then(URL.createObjectURL);
|
|
22251
22271
|
} else {
|
|
22252
|
-
|
|
22272
|
+
log.info('The image or video is not cached', attachmentUrl);
|
|
22253
22273
|
return false;
|
|
22254
22274
|
}
|
|
22255
22275
|
});
|
|
@@ -22541,7 +22561,7 @@ var VideoPlayer = function VideoPlayer(_ref) {
|
|
|
22541
22561
|
var checkVideoInterval;
|
|
22542
22562
|
if (videoRef.current) {
|
|
22543
22563
|
checkVideoInterval = setInterval(function () {
|
|
22544
|
-
|
|
22564
|
+
log.info('videoRef.current.readyState . . . . ', videoRef && videoRef.current && videoRef.current.readyState);
|
|
22545
22565
|
if (videoRef.current && videoRef.current.readyState > 0) {
|
|
22546
22566
|
setVideoTime(videoRef.current.duration);
|
|
22547
22567
|
setVolume(videoRef.current.volume);
|
|
@@ -23155,7 +23175,7 @@ var SliderPopup = function SliderPopup(_ref) {
|
|
|
23155
23175
|
};
|
|
23156
23176
|
var handleCompleteDownload = function handleCompleteDownload(attachmentId, failed) {
|
|
23157
23177
|
if (failed) {
|
|
23158
|
-
|
|
23178
|
+
log.info('file download failed!');
|
|
23159
23179
|
}
|
|
23160
23180
|
var stateCopy = _extends({}, downloadingFilesMap);
|
|
23161
23181
|
delete stateCopy[attachmentId];
|
|
@@ -23325,7 +23345,7 @@ var SliderPopup = function SliderPopup(_ref) {
|
|
|
23325
23345
|
return Promise.reject(e);
|
|
23326
23346
|
}
|
|
23327
23347
|
})["catch"](function (e) {
|
|
23328
|
-
|
|
23348
|
+
log.info('fail to download image...... ', e);
|
|
23329
23349
|
});
|
|
23330
23350
|
} else {
|
|
23331
23351
|
if (!downloadedFiles[currentFile.id]) {
|
|
@@ -23351,7 +23371,7 @@ var SliderPopup = function SliderPopup(_ref) {
|
|
|
23351
23371
|
}
|
|
23352
23372
|
}
|
|
23353
23373
|
})["catch"](function (e) {
|
|
23354
|
-
return
|
|
23374
|
+
return log.info(e);
|
|
23355
23375
|
});
|
|
23356
23376
|
}
|
|
23357
23377
|
}, [currentFile]);
|
|
@@ -24564,7 +24584,7 @@ var getFrame = function getFrame(videoSrc, time) {
|
|
|
24564
24584
|
var pixels = ctx.getImageData(0, 0, canvas.width, canvas.height);
|
|
24565
24585
|
var binaryThumbHash = rgbaToThumbHash(pixels.width, pixels.height, pixels.data);
|
|
24566
24586
|
var thumb = binaryToBase64(binaryThumbHash);
|
|
24567
|
-
|
|
24587
|
+
log.info('generated thumb hash ... ', thumb);
|
|
24568
24588
|
clearInterval(b);
|
|
24569
24589
|
resolve({
|
|
24570
24590
|
thumb: thumb,
|
|
@@ -24964,7 +24984,7 @@ var AudioPlayer = function AudioPlayer(_ref) {
|
|
|
24964
24984
|
var audioDuration = wavesurfer.current.getDuration();
|
|
24965
24985
|
setCurrentTime(formatAudioVideoTime(audioDuration));
|
|
24966
24986
|
wavesurfer.current.drawBuffer = function (d) {
|
|
24967
|
-
|
|
24987
|
+
log.info('filters --- ', d);
|
|
24968
24988
|
};
|
|
24969
24989
|
});
|
|
24970
24990
|
wavesurfer.current.on('finish', function () {
|
|
@@ -24993,7 +25013,7 @@ var AudioPlayer = function AudioPlayer(_ref) {
|
|
|
24993
25013
|
}
|
|
24994
25014
|
});
|
|
24995
25015
|
}, function () {
|
|
24996
|
-
|
|
25016
|
+
log.info('Failed to init wavesurfer');
|
|
24997
25017
|
});
|
|
24998
25018
|
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
24999
25019
|
} catch (e) {
|
|
@@ -25122,7 +25142,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
25122
25142
|
attachmentThumb = attachment.metadata && attachment.metadata.tmb;
|
|
25123
25143
|
}
|
|
25124
25144
|
} catch (e) {
|
|
25125
|
-
|
|
25145
|
+
log.info('error on get attachmentThumb', e);
|
|
25126
25146
|
}
|
|
25127
25147
|
}
|
|
25128
25148
|
var downloadImage = function downloadImage(url) {
|
|
@@ -25321,7 +25341,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
25321
25341
|
return Promise.reject(e);
|
|
25322
25342
|
}
|
|
25323
25343
|
})["catch"](function (e) {
|
|
25324
|
-
|
|
25344
|
+
log.info('error on get attachment url from cache. .. ', e);
|
|
25325
25345
|
if (customDownloader) {
|
|
25326
25346
|
setDownloadingFile(true);
|
|
25327
25347
|
customDownloader(attachment.url, false).then(function (url) {
|
|
@@ -26947,7 +26967,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
26947
26967
|
var showMessageSenderName = (isUnreadMessage || prevMessageUserID !== messageUserID || firstMessageInInterval) && (channel.type === DEFAULT_CHANNEL_TYPE.DIRECT ? showSenderNameOnDirectChannel : showSenderNameOnGroupChannel) && (message.incoming || showSenderNameOnOwnMessages);
|
|
26948
26968
|
var selectionIsActive = selectedMessagesMap && selectedMessagesMap.size > 0;
|
|
26949
26969
|
var handleRemoveFailedAttachment = function handleRemoveFailedAttachment(attachmentId) {
|
|
26950
|
-
|
|
26970
|
+
log.info('remove attachment .. ', attachmentId);
|
|
26951
26971
|
};
|
|
26952
26972
|
return /*#__PURE__*/React__default.createElement(MessageBodyContainer, {
|
|
26953
26973
|
className: 'messageBody',
|
|
@@ -27567,7 +27587,7 @@ var Message$1 = function Message(_ref) {
|
|
|
27567
27587
|
if (isVisible && message.incoming && !(message.userMarkers && message.userMarkers.length && message.userMarkers.find(function (marker) {
|
|
27568
27588
|
return marker.name === MESSAGE_DELIVERY_STATUS.READ;
|
|
27569
27589
|
})) && channel.newMessageCount && channel.newMessageCount > 0 && connectionStatus === CONNECTION_STATUS.CONNECTED) {
|
|
27570
|
-
|
|
27590
|
+
log.info('send displayed marker for message ... ', message);
|
|
27571
27591
|
dispatch(markMessagesAsReadAC(channel.id, [message.id]));
|
|
27572
27592
|
}
|
|
27573
27593
|
};
|
|
@@ -28656,7 +28676,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
28656
28676
|
}
|
|
28657
28677
|
}, [messages]);
|
|
28658
28678
|
useDidUpdate(function () {
|
|
28659
|
-
|
|
28679
|
+
log.info('connection status is changed.. .... ', connectionStatus, 'channel ... ', channel);
|
|
28660
28680
|
if (connectionStatus === CONNECTION_STATUS.CONNECTED) {
|
|
28661
28681
|
loading = false;
|
|
28662
28682
|
prevDisable = false;
|
|
@@ -30526,7 +30546,7 @@ function EmojisPopup$1(_ref2) {
|
|
|
30526
30546
|
editor = _useLexicalComposerCo[0];
|
|
30527
30547
|
richTextEditor = editor;
|
|
30528
30548
|
} catch (e) {
|
|
30529
|
-
|
|
30549
|
+
log.info('error getting editor', e);
|
|
30530
30550
|
}
|
|
30531
30551
|
var _useState = useState(false),
|
|
30532
30552
|
rendered = _useState[0],
|
|
@@ -31069,7 +31089,7 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
31069
31089
|
var buffer = _ref2[0],
|
|
31070
31090
|
blob = _ref2[1];
|
|
31071
31091
|
setCurrentTime(0);
|
|
31072
|
-
|
|
31092
|
+
log.info(buffer, blob);
|
|
31073
31093
|
var file = new File(buffer, 'record.mp3', {
|
|
31074
31094
|
type: blob.type,
|
|
31075
31095
|
lastModified: Date.now()
|
|
@@ -31107,7 +31127,7 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
31107
31127
|
});
|
|
31108
31128
|
}
|
|
31109
31129
|
}, function (e) {
|
|
31110
|
-
|
|
31130
|
+
log.info('Error decoding audio data: ' + e.err);
|
|
31111
31131
|
});
|
|
31112
31132
|
};
|
|
31113
31133
|
reader.readAsArrayBuffer(blob);
|
|
@@ -31205,7 +31225,7 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
31205
31225
|
}();
|
|
31206
31226
|
return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
|
|
31207
31227
|
}, function () {
|
|
31208
|
-
|
|
31228
|
+
log.info('Failed to init wavesurfer');
|
|
31209
31229
|
});
|
|
31210
31230
|
return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
|
|
31211
31231
|
} catch (e) {
|
|
@@ -31236,7 +31256,7 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
31236
31256
|
setRecorder(recorder);
|
|
31237
31257
|
});
|
|
31238
31258
|
}, function () {
|
|
31239
|
-
|
|
31259
|
+
log.info('Failed to init mic-recorder-to-mp3');
|
|
31240
31260
|
});
|
|
31241
31261
|
if (_temp4 && _temp4.then) return _temp4.then(function () {});
|
|
31242
31262
|
}
|
|
@@ -31667,7 +31687,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
31667
31687
|
handleEditMessage();
|
|
31668
31688
|
} else if (messageText.trim() || attachments.length && attachments.length > 0) {
|
|
31669
31689
|
var messageTexToSend = messageText.trim();
|
|
31670
|
-
|
|
31690
|
+
log.info('messageTexToSend . . . . .', messageTexToSend);
|
|
31671
31691
|
var messageToSend = {
|
|
31672
31692
|
body: messageTexToSend,
|
|
31673
31693
|
bodyAttributes: messageBodyAttributes,
|
|
@@ -31686,7 +31706,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
31686
31706
|
});
|
|
31687
31707
|
}
|
|
31688
31708
|
messageToSend.mentionedMembers = mentionMembersToSend;
|
|
31689
|
-
|
|
31709
|
+
log.info('message to send ..........................................', messageToSend);
|
|
31690
31710
|
if (messageForReply) {
|
|
31691
31711
|
messageToSend.parentMessage = messageForReply;
|
|
31692
31712
|
}
|
|
@@ -32210,7 +32230,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
32210
32230
|
dataFromDb = _getDataFromDB;
|
|
32211
32231
|
});
|
|
32212
32232
|
}, function (e) {
|
|
32213
|
-
|
|
32233
|
+
log.info('error in get data from db . . . . ', e);
|
|
32214
32234
|
});
|
|
32215
32235
|
return _temp11 && _temp11.then ? _temp11.then(_temp12) : _temp12(_temp11);
|
|
32216
32236
|
});
|
|
@@ -32219,7 +32239,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
32219
32239
|
}
|
|
32220
32240
|
};
|
|
32221
32241
|
reader.onerror = function (e) {
|
|
32222
|
-
|
|
32242
|
+
log.info(' error on read file onError', e);
|
|
32223
32243
|
};
|
|
32224
32244
|
reader.readAsBinaryString(file);
|
|
32225
32245
|
return Promise.resolve();
|
|
@@ -32330,7 +32350,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
32330
32350
|
}
|
|
32331
32351
|
};
|
|
32332
32352
|
reader.onerror = function (e) {
|
|
32333
|
-
|
|
32353
|
+
log.info(' error on read file onError', e);
|
|
32334
32354
|
};
|
|
32335
32355
|
reader.readAsBinaryString(recordedFile.file);
|
|
32336
32356
|
}
|
|
@@ -33332,7 +33352,7 @@ var Actions = function Actions(_ref) {
|
|
|
33332
33352
|
dispatch(deleteAllMessagesAC(channel.id));
|
|
33333
33353
|
};
|
|
33334
33354
|
var handleNotificationOnOff = function handleNotificationOnOff(expTime) {
|
|
33335
|
-
|
|
33355
|
+
log.info('exp time ... ', expTime);
|
|
33336
33356
|
if (channel.muted) {
|
|
33337
33357
|
dispatch(turnOnNotificationsAC());
|
|
33338
33358
|
} else {
|
|
@@ -33340,7 +33360,7 @@ var Actions = function Actions(_ref) {
|
|
|
33340
33360
|
}
|
|
33341
33361
|
};
|
|
33342
33362
|
var handleToggleChannelMarkAs = function handleToggleChannelMarkAs() {
|
|
33343
|
-
|
|
33363
|
+
log.info('handle action mark read ', channel.unread);
|
|
33344
33364
|
if (channel.unread) {
|
|
33345
33365
|
dispatch(markChannelAsReadAC(channel.id));
|
|
33346
33366
|
} else {
|
|
@@ -33432,7 +33452,7 @@ var Actions = function Actions(_ref) {
|
|
|
33432
33452
|
}, "Mute forever"))))), showStarredMessages && !channel.isMockChannel && (/*#__PURE__*/React__default.createElement(ActionItem, {
|
|
33433
33453
|
key: 1,
|
|
33434
33454
|
onClick: function onClick() {
|
|
33435
|
-
return
|
|
33455
|
+
return log.info('stared messages');
|
|
33436
33456
|
},
|
|
33437
33457
|
order: starredMessagesOrder,
|
|
33438
33458
|
iconColor: staredMessagesIconColor || textSecondary,
|
|
@@ -33525,7 +33545,7 @@ var Actions = function Actions(_ref) {
|
|
|
33525
33545
|
onClick: function onClick() {
|
|
33526
33546
|
setPopupButtonText('Report');
|
|
33527
33547
|
setPopupTitle('Report channel');
|
|
33528
|
-
|
|
33548
|
+
log.info('Report channel');
|
|
33529
33549
|
}
|
|
33530
33550
|
}, 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, {
|
|
33531
33551
|
key: 10,
|
|
@@ -34269,7 +34289,7 @@ var Files = function Files(_ref) {
|
|
|
34269
34289
|
useEffect(function () {
|
|
34270
34290
|
dispatch(getAttachmentsAC(channelId, channelDetailsTabs.file));
|
|
34271
34291
|
}, [channelId]);
|
|
34272
|
-
|
|
34292
|
+
log.info('attachments. .. . ', attachments);
|
|
34273
34293
|
return /*#__PURE__*/React__default.createElement(Container$o, {
|
|
34274
34294
|
theme: theme
|
|
34275
34295
|
}, attachments.map(function (file) {
|
|
@@ -35032,10 +35052,10 @@ var EditChannel = function EditChannel(_ref) {
|
|
|
35032
35052
|
} else {
|
|
35033
35053
|
handleUpdateChannel(_extends({}, newSubject !== channel.subject && {
|
|
35034
35054
|
subject: newSubject
|
|
35035
|
-
},
|
|
35036
|
-
metadata: _extends({}, channel.metadata, {
|
|
35055
|
+
}, {
|
|
35056
|
+
metadata: _extends({}, (channel === null || channel === void 0 ? void 0 : channel.metadata) || {}, newDescription !== channel.metadata.d ? {
|
|
35037
35057
|
d: newDescription
|
|
35038
|
-
})
|
|
35058
|
+
} : {})
|
|
35039
35059
|
}, newAvatar.url !== channel.avatarUrl && {
|
|
35040
35060
|
avatar: newAvatar.src.file
|
|
35041
35061
|
}));
|