@flashphoner/sfusdk 2.0.272 → 2.0.274
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/dist/client.version +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/sdk/constants.d.ts +299 -51
- package/dist/sdk/constants.js +70 -18
- package/dist/sdk/constants.js.map +1 -1
- package/dist/sdk/sfu-extended.d.ts +134 -44
- package/dist/sdk/sfu-extended.js +426 -86
- package/dist/sdk/sfu-extended.js.map +1 -1
- package/package.json +1 -1
package/dist/sdk/sfu-extended.js
CHANGED
|
@@ -343,15 +343,13 @@ class SfuExtended {
|
|
|
343
343
|
else if ((!msg.body || msg.body === "") && (!msg.attachments || msg.attachments.length === 0)) {
|
|
344
344
|
reject(new Error(constants_1.ChatError.CAN_NOT_SEND_MESSAGE_WITHOUT_CONTENT));
|
|
345
345
|
}
|
|
346
|
-
else if (!msg.chatId || msg.chatId === "") {
|
|
347
|
-
reject(new Error(constants_1.ChatError.CAN_NOT_SEND_MESSAGE_WITHOUT_CHAT_ID));
|
|
348
|
-
}
|
|
349
346
|
else {
|
|
350
347
|
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.SEND_MESSAGE, {
|
|
351
348
|
to: msg.to,
|
|
352
349
|
parentId: msg.parentId,
|
|
353
350
|
body: msg.body,
|
|
354
|
-
|
|
351
|
+
targetEntityType: msg.targetEntityType,
|
|
352
|
+
targetEntityId: msg.targetEntityId,
|
|
355
353
|
attachments: msg.attachments
|
|
356
354
|
}, resolve, reject);
|
|
357
355
|
}
|
|
@@ -511,13 +509,10 @@ class SfuExtended {
|
|
|
511
509
|
getMessageAttachment(attachment) {
|
|
512
510
|
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
513
511
|
const self = this;
|
|
514
|
-
const {
|
|
512
|
+
const { targetEntityType, targetEntityId, messageId, attachmentId, name } = attachment;
|
|
515
513
|
if (!messageId || messageId === '') {
|
|
516
514
|
throw new Error('Empty messageId');
|
|
517
515
|
}
|
|
518
|
-
if (!chatId || chatId === '') {
|
|
519
|
-
throw new Error('Empty chatId');
|
|
520
|
-
}
|
|
521
516
|
if (!name || name === '') {
|
|
522
517
|
throw new Error('Empty attachment name');
|
|
523
518
|
}
|
|
@@ -526,8 +521,9 @@ class SfuExtended {
|
|
|
526
521
|
}
|
|
527
522
|
return new Promise(function (resolve, reject) {
|
|
528
523
|
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.GET_ATTACHMENT, {
|
|
524
|
+
targetEntityType: targetEntityType,
|
|
525
|
+
targetEntityId: targetEntityId,
|
|
529
526
|
messageId: messageId,
|
|
530
|
-
chatId: chatId,
|
|
531
527
|
attachmentId: attachmentId,
|
|
532
528
|
name: name,
|
|
533
529
|
size: __classPrivateFieldGet(self, _SfuExtended_binaryChunkSize, "f")
|
|
@@ -541,16 +537,14 @@ class SfuExtended {
|
|
|
541
537
|
if (!msg) {
|
|
542
538
|
reject(new Error("Can't mark null message"));
|
|
543
539
|
}
|
|
544
|
-
else if (!msg.chatId || msg.chatId === "") {
|
|
545
|
-
reject(new Error("Can't mark message without a chatId"));
|
|
546
|
-
}
|
|
547
540
|
else if (!msg.id || msg.id === "") {
|
|
548
541
|
reject(new Error("Can't mark message without massage id"));
|
|
549
542
|
}
|
|
550
543
|
else {
|
|
551
544
|
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.MARK_MESSAGE_READ, {
|
|
552
545
|
id: msg.id,
|
|
553
|
-
|
|
546
|
+
targetEntityType: msg.targetEntityType,
|
|
547
|
+
targetEntityId: msg.targetEntityId,
|
|
554
548
|
}, resolve, reject);
|
|
555
549
|
}
|
|
556
550
|
});
|
|
@@ -562,16 +556,14 @@ class SfuExtended {
|
|
|
562
556
|
if (!msg) {
|
|
563
557
|
reject(new Error("Can't mark null message"));
|
|
564
558
|
}
|
|
565
|
-
else if (!msg.chatId || msg.chatId === "") {
|
|
566
|
-
reject(new Error("Can't mark message without a chatId"));
|
|
567
|
-
}
|
|
568
559
|
else if (!msg.id || msg.id === "") {
|
|
569
560
|
reject(new Error("Can't mark message without massage id"));
|
|
570
561
|
}
|
|
571
562
|
else {
|
|
572
563
|
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.MARK_MESSAGE_UNREAD, {
|
|
573
564
|
id: msg.id,
|
|
574
|
-
|
|
565
|
+
targetEntityType: msg.targetEntityType,
|
|
566
|
+
targetEntityId: msg.targetEntityId,
|
|
575
567
|
}, resolve, reject);
|
|
576
568
|
}
|
|
577
569
|
});
|
|
@@ -729,11 +721,11 @@ class SfuExtended {
|
|
|
729
721
|
});
|
|
730
722
|
}
|
|
731
723
|
;
|
|
732
|
-
|
|
724
|
+
loadMessages(params) {
|
|
733
725
|
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
734
726
|
const self = this;
|
|
735
727
|
return new Promise(function (resolve, reject) {
|
|
736
|
-
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.
|
|
728
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.LOAD_MESSAGES, params, resolve, reject);
|
|
737
729
|
});
|
|
738
730
|
}
|
|
739
731
|
;
|
|
@@ -745,21 +737,23 @@ class SfuExtended {
|
|
|
745
737
|
});
|
|
746
738
|
}
|
|
747
739
|
;
|
|
748
|
-
|
|
740
|
+
getMessagesCount(options) {
|
|
749
741
|
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
750
742
|
const self = this;
|
|
751
743
|
return new Promise(function (resolve, reject) {
|
|
752
|
-
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.
|
|
753
|
-
|
|
744
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.GET_MESSAGES_COUNT, {
|
|
745
|
+
targetEntityType: options.targetEntityType,
|
|
746
|
+
targetEntityId: options.targetEntityId
|
|
754
747
|
}, resolve, reject);
|
|
755
748
|
});
|
|
756
749
|
}
|
|
757
|
-
getFirstAndLastMessage(
|
|
750
|
+
getFirstAndLastMessage(options) {
|
|
758
751
|
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
759
752
|
const self = this;
|
|
760
753
|
return new Promise(function (resolve, reject) {
|
|
761
|
-
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.
|
|
762
|
-
|
|
754
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.GET_FIRST_AND_LAST_MESSAGE, {
|
|
755
|
+
targetEntityType: options.targetEntityType,
|
|
756
|
+
targetEntityId: options.targetEntityId
|
|
763
757
|
}, resolve, reject);
|
|
764
758
|
});
|
|
765
759
|
}
|
|
@@ -770,7 +764,6 @@ class SfuExtended {
|
|
|
770
764
|
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.SEARCH_MESSAGE_ATTACHMENTS, {
|
|
771
765
|
chatId: params.chatId,
|
|
772
766
|
attachmentsType: params.attachmentsType,
|
|
773
|
-
bookmarkedOnly: params.bookmarkedOnly,
|
|
774
767
|
from: params.from,
|
|
775
768
|
timeFrame: params.timeFrame,
|
|
776
769
|
boundaries: params.boundaries,
|
|
@@ -780,20 +773,6 @@ class SfuExtended {
|
|
|
780
773
|
});
|
|
781
774
|
}
|
|
782
775
|
;
|
|
783
|
-
loadBookmarkedMessages(params) {
|
|
784
|
-
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
785
|
-
const self = this;
|
|
786
|
-
return new Promise(function (resolve, reject) {
|
|
787
|
-
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.LOAD_BOOKMARKED_MESSAGES, {
|
|
788
|
-
chatId: params.chatId,
|
|
789
|
-
timeFrame: params.timeFrame,
|
|
790
|
-
pageRequest: params.pageRequest,
|
|
791
|
-
boundaries: params.boundaries,
|
|
792
|
-
sortOrder: params.sortOrder,
|
|
793
|
-
}, resolve, reject);
|
|
794
|
-
});
|
|
795
|
-
}
|
|
796
|
-
;
|
|
797
776
|
loadMessagesWithMentions(params) {
|
|
798
777
|
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
799
778
|
const self = this;
|
|
@@ -842,46 +821,28 @@ class SfuExtended {
|
|
|
842
821
|
});
|
|
843
822
|
}
|
|
844
823
|
;
|
|
845
|
-
|
|
824
|
+
editMessage(msg) {
|
|
846
825
|
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
847
826
|
const self = this;
|
|
848
827
|
return new Promise(function (resolve, reject) {
|
|
849
|
-
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.
|
|
828
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.EDIT_MESSAGE, {
|
|
850
829
|
id: msg.messageId,
|
|
851
|
-
|
|
830
|
+
targetEntityType: msg.targetEntityType,
|
|
831
|
+
targetEntityId: msg.targetEntityId,
|
|
852
832
|
body: msg.body,
|
|
853
833
|
attachments: msg.attachmentsToSend,
|
|
854
834
|
attachmentIdsToDelete: msg.attachmentIdsToDelete
|
|
855
835
|
}, resolve, reject);
|
|
856
836
|
});
|
|
857
837
|
}
|
|
858
|
-
|
|
838
|
+
deleteMessage(msg) {
|
|
859
839
|
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
860
840
|
const self = this;
|
|
861
841
|
return new Promise(function (resolve, reject) {
|
|
862
|
-
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.
|
|
842
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.DELETE_MESSAGE, {
|
|
863
843
|
id: msg.messageId,
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
});
|
|
867
|
-
}
|
|
868
|
-
addMessageToBookmarks(msg) {
|
|
869
|
-
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
870
|
-
const self = this;
|
|
871
|
-
return new Promise(function (resolve, reject) {
|
|
872
|
-
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.ADD_MESSAGE_TO_BOOKMARKS, {
|
|
873
|
-
id: msg.messageId,
|
|
874
|
-
chatId: msg.chatId
|
|
875
|
-
}, resolve, reject);
|
|
876
|
-
});
|
|
877
|
-
}
|
|
878
|
-
removeMessageFromBookmarks(msg) {
|
|
879
|
-
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
880
|
-
const self = this;
|
|
881
|
-
return new Promise(function (resolve, reject) {
|
|
882
|
-
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.REMOVE_MESSAGE_FROM_BOOKMARKS, {
|
|
883
|
-
chatId: msg.chatId,
|
|
884
|
-
id: msg.messageId
|
|
844
|
+
targetEntityType: msg.targetEntityType,
|
|
845
|
+
targetEntityId: msg.targetEntityId,
|
|
885
846
|
}, resolve, reject);
|
|
886
847
|
});
|
|
887
848
|
}
|
|
@@ -1057,6 +1018,260 @@ class SfuExtended {
|
|
|
1057
1018
|
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1058
1019
|
return __classPrivateFieldGet(this, _SfuExtended_rooms, "f")[options.id];
|
|
1059
1020
|
}
|
|
1021
|
+
getUserSpaces() {
|
|
1022
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1023
|
+
const self = this;
|
|
1024
|
+
return new Promise(function (resolve, reject) {
|
|
1025
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.GET_USER_SPACES, {}, resolve, reject);
|
|
1026
|
+
});
|
|
1027
|
+
}
|
|
1028
|
+
createSpace(space) {
|
|
1029
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1030
|
+
const self = this;
|
|
1031
|
+
return new Promise(function (resolve, reject) {
|
|
1032
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.CREATE_SPACE, {
|
|
1033
|
+
name: space.name,
|
|
1034
|
+
}, resolve, reject);
|
|
1035
|
+
});
|
|
1036
|
+
}
|
|
1037
|
+
updateSpaceOverview(space) {
|
|
1038
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1039
|
+
const self = this;
|
|
1040
|
+
return new Promise(function (resolve, reject) {
|
|
1041
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.UPDATE_SPACE_OVERVIEW, {
|
|
1042
|
+
id: space.id,
|
|
1043
|
+
name: space.name,
|
|
1044
|
+
}, resolve, reject);
|
|
1045
|
+
});
|
|
1046
|
+
}
|
|
1047
|
+
deleteSpace(space) {
|
|
1048
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1049
|
+
const self = this;
|
|
1050
|
+
return new Promise(function (resolve, reject) {
|
|
1051
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.DELETE_SPACE, {
|
|
1052
|
+
id: space.id,
|
|
1053
|
+
}, resolve, reject);
|
|
1054
|
+
});
|
|
1055
|
+
}
|
|
1056
|
+
leaveSpace(space) {
|
|
1057
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1058
|
+
const self = this;
|
|
1059
|
+
return new Promise(function (resolve, reject) {
|
|
1060
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.LEAVE_SPACE, {
|
|
1061
|
+
id: space.id,
|
|
1062
|
+
}, resolve, reject);
|
|
1063
|
+
});
|
|
1064
|
+
}
|
|
1065
|
+
generateNewSpaceInvite(options) {
|
|
1066
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1067
|
+
const self = this;
|
|
1068
|
+
return new Promise(function (resolve, reject) {
|
|
1069
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.GENERATE_SPACE_INVITE, {
|
|
1070
|
+
spaceId: options.spaceId,
|
|
1071
|
+
lifespan: options.lifespan
|
|
1072
|
+
}, resolve, reject);
|
|
1073
|
+
});
|
|
1074
|
+
}
|
|
1075
|
+
revokeSpaceInvite(options) {
|
|
1076
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1077
|
+
const self = this;
|
|
1078
|
+
return new Promise(function (resolve, reject) {
|
|
1079
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.REVOKE_SPACE_INVITE, {
|
|
1080
|
+
spaceId: options.spaceId,
|
|
1081
|
+
inviteCode: options.inviteCode
|
|
1082
|
+
}, resolve, reject);
|
|
1083
|
+
});
|
|
1084
|
+
}
|
|
1085
|
+
joinSpaceByInviteCode(inviteCode) {
|
|
1086
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1087
|
+
const self = this;
|
|
1088
|
+
return new Promise(function (resolve, reject) {
|
|
1089
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.JOIN_SPACE_BY_INVITE_CODE, {
|
|
1090
|
+
inviteCode: inviteCode,
|
|
1091
|
+
}, resolve, reject);
|
|
1092
|
+
});
|
|
1093
|
+
}
|
|
1094
|
+
createSpaceCategory(category) {
|
|
1095
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1096
|
+
const self = this;
|
|
1097
|
+
return new Promise(function (resolve, reject) {
|
|
1098
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.CREATE_SPACE_CATEGORY, {
|
|
1099
|
+
spaceId: category.spaceId,
|
|
1100
|
+
name: category.name,
|
|
1101
|
+
}, resolve, reject);
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
deleteSpaceCategory(options) {
|
|
1105
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1106
|
+
const self = this;
|
|
1107
|
+
return new Promise(function (resolve, reject) {
|
|
1108
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.DELETE_SPACE_CATEGORY, {
|
|
1109
|
+
spaceId: options.spaceId,
|
|
1110
|
+
categoryId: options.categoryId
|
|
1111
|
+
}, resolve, reject);
|
|
1112
|
+
});
|
|
1113
|
+
}
|
|
1114
|
+
updateSpaceCategory(options) {
|
|
1115
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1116
|
+
const self = this;
|
|
1117
|
+
return new Promise(function (resolve, reject) {
|
|
1118
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.UPDATE_SPACE_CATEGORY, {
|
|
1119
|
+
spaceId: options.spaceId,
|
|
1120
|
+
categoryId: options.categoryId,
|
|
1121
|
+
name: options.name
|
|
1122
|
+
}, resolve, reject);
|
|
1123
|
+
});
|
|
1124
|
+
}
|
|
1125
|
+
createSpaceChannel(channel) {
|
|
1126
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1127
|
+
const self = this;
|
|
1128
|
+
return new Promise(function (resolve, reject) {
|
|
1129
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.CREATE_SPACE_CHANNEL, {
|
|
1130
|
+
spaceId: channel.spaceId,
|
|
1131
|
+
categoryId: channel.categoryId,
|
|
1132
|
+
name: channel.name,
|
|
1133
|
+
private: channel.isPrivate,
|
|
1134
|
+
roles: channel.roles,
|
|
1135
|
+
members: channel.members
|
|
1136
|
+
}, resolve, reject);
|
|
1137
|
+
});
|
|
1138
|
+
}
|
|
1139
|
+
updateSpaceChannel(channel) {
|
|
1140
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1141
|
+
const self = this;
|
|
1142
|
+
return new Promise(function (resolve, reject) {
|
|
1143
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.UPDATE_SPACE_CHANNEL, {
|
|
1144
|
+
spaceId: channel.spaceId,
|
|
1145
|
+
channelId: channel.channelId,
|
|
1146
|
+
name: channel.name,
|
|
1147
|
+
private: channel.isPrivate,
|
|
1148
|
+
roles: channel.roles,
|
|
1149
|
+
members: channel.members
|
|
1150
|
+
}, resolve, reject);
|
|
1151
|
+
});
|
|
1152
|
+
}
|
|
1153
|
+
moveSpaceChannel(channel) {
|
|
1154
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1155
|
+
const self = this;
|
|
1156
|
+
return new Promise(function (resolve, reject) {
|
|
1157
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.MOVE_SPACE_CHANNEL, {
|
|
1158
|
+
spaceId: channel.spaceId,
|
|
1159
|
+
categoryId: channel.categoryId,
|
|
1160
|
+
channelId: channel.channelId,
|
|
1161
|
+
}, resolve, reject);
|
|
1162
|
+
});
|
|
1163
|
+
}
|
|
1164
|
+
deleteSpaceChannel(options) {
|
|
1165
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1166
|
+
const self = this;
|
|
1167
|
+
return new Promise(function (resolve, reject) {
|
|
1168
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.DELETE_SPACE_CHANNEL, {
|
|
1169
|
+
spaceId: options.spaceId,
|
|
1170
|
+
channelId: options.channelId
|
|
1171
|
+
}, resolve, reject);
|
|
1172
|
+
});
|
|
1173
|
+
}
|
|
1174
|
+
createSpaceThread(thread) {
|
|
1175
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1176
|
+
const self = this;
|
|
1177
|
+
return new Promise(function (resolve, reject) {
|
|
1178
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.CREATE_SPACE_THREAD, {
|
|
1179
|
+
spaceId: thread.spaceId,
|
|
1180
|
+
channelId: thread.channelId,
|
|
1181
|
+
name: thread.name,
|
|
1182
|
+
private: thread.isPrivate
|
|
1183
|
+
}, resolve, reject);
|
|
1184
|
+
});
|
|
1185
|
+
}
|
|
1186
|
+
updateSpaceThread(options) {
|
|
1187
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1188
|
+
const self = this;
|
|
1189
|
+
return new Promise(function (resolve, reject) {
|
|
1190
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.UPDATE_SPACE_THREAD, {
|
|
1191
|
+
spaceId: options.spaceId,
|
|
1192
|
+
channelId: options.channelId,
|
|
1193
|
+
threadId: options.threadId,
|
|
1194
|
+
name: options.name
|
|
1195
|
+
}, resolve, reject);
|
|
1196
|
+
});
|
|
1197
|
+
}
|
|
1198
|
+
deleteSpaceThread(options) {
|
|
1199
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1200
|
+
const self = this;
|
|
1201
|
+
return new Promise(function (resolve, reject) {
|
|
1202
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.DELETE_SPACE_THREAD, {
|
|
1203
|
+
spaceId: options.spaceId,
|
|
1204
|
+
channelId: options.channelId,
|
|
1205
|
+
threadId: options.threadId
|
|
1206
|
+
}, resolve, reject);
|
|
1207
|
+
});
|
|
1208
|
+
}
|
|
1209
|
+
addSpaceRole(role) {
|
|
1210
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1211
|
+
const self = this;
|
|
1212
|
+
return new Promise(function (resolve, reject) {
|
|
1213
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.ADD_SPACE_ROLE, {
|
|
1214
|
+
spaceId: role.spaceId,
|
|
1215
|
+
roleName: role.name,
|
|
1216
|
+
color: role.color,
|
|
1217
|
+
permissions: role.permissions,
|
|
1218
|
+
members: role.members
|
|
1219
|
+
}, resolve, reject);
|
|
1220
|
+
});
|
|
1221
|
+
}
|
|
1222
|
+
updateSpaceRole(role) {
|
|
1223
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1224
|
+
const self = this;
|
|
1225
|
+
return new Promise(function (resolve, reject) {
|
|
1226
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.UPDATE_SPACE_ROLE, {
|
|
1227
|
+
spaceId: role.spaceId,
|
|
1228
|
+
roleId: role.roleId,
|
|
1229
|
+
roleName: role.name,
|
|
1230
|
+
color: role.color,
|
|
1231
|
+
permissions: role.permissions,
|
|
1232
|
+
members: role.members
|
|
1233
|
+
}, resolve, reject);
|
|
1234
|
+
});
|
|
1235
|
+
}
|
|
1236
|
+
deleteSpaceRole(options) {
|
|
1237
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1238
|
+
const self = this;
|
|
1239
|
+
return new Promise(function (resolve, reject) {
|
|
1240
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.DELETE_SPACE_ROLE, {
|
|
1241
|
+
spaceId: options.spaceId,
|
|
1242
|
+
roleId: options.roleId
|
|
1243
|
+
}, resolve, reject);
|
|
1244
|
+
});
|
|
1245
|
+
}
|
|
1246
|
+
addRoleToMember(options) {
|
|
1247
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1248
|
+
const self = this;
|
|
1249
|
+
return new Promise(function (resolve, reject) {
|
|
1250
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.ADD_ROLE_TO_MEMBER, {
|
|
1251
|
+
spaceId: options.spaceId,
|
|
1252
|
+
roleId: options.roleId,
|
|
1253
|
+
memberId: options.memberId
|
|
1254
|
+
}, resolve, reject);
|
|
1255
|
+
});
|
|
1256
|
+
}
|
|
1257
|
+
removeRoleFromMember(options) {
|
|
1258
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1259
|
+
const self = this;
|
|
1260
|
+
return new Promise(function (resolve, reject) {
|
|
1261
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.REMOVE_ROLE_FROM_MEMBER, {
|
|
1262
|
+
spaceId: options.spaceId,
|
|
1263
|
+
roleId: options.roleId,
|
|
1264
|
+
memberId: options.memberId
|
|
1265
|
+
}, resolve, reject);
|
|
1266
|
+
});
|
|
1267
|
+
}
|
|
1268
|
+
getRolePermissions() {
|
|
1269
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1270
|
+
const self = this;
|
|
1271
|
+
return new Promise(function (resolve, reject) {
|
|
1272
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.GET_ROLE_PERMISSIONS, {}, resolve, reject);
|
|
1273
|
+
});
|
|
1274
|
+
}
|
|
1060
1275
|
disconnect() {
|
|
1061
1276
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1062
1277
|
for (const [key, value] of Object.entries(__classPrivateFieldGet(this, _SfuExtended_rooms, "f"))) {
|
|
@@ -1443,43 +1658,167 @@ _SfuExtended_connection = new WeakMap(), _SfuExtended__user = new WeakMap(), _Sf
|
|
|
1443
1658
|
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SfuEvent.MESSAGE_ATTACHMENTS_SEARCH_RESULT, result);
|
|
1444
1659
|
}
|
|
1445
1660
|
}
|
|
1446
|
-
else if (data[0].type === constants_1.SfuEvent.LOAD_BOOKMARKED_MESSAGES_RESULT) {
|
|
1447
|
-
const result = data[0];
|
|
1448
|
-
if (!promises_1.default.resolve(data[0].internalMessageId, result)) {
|
|
1449
|
-
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SfuEvent.LOAD_BOOKMARKED_MESSAGES_RESULT, result);
|
|
1450
|
-
}
|
|
1451
|
-
}
|
|
1452
1661
|
else if (data[0].type === constants_1.SfuEvent.LOAD_MESSAGES_WITH_MENTIONS_RESULT) {
|
|
1453
1662
|
const result = data[0];
|
|
1454
1663
|
if (!promises_1.default.resolve(data[0].internalMessageId, result)) {
|
|
1455
1664
|
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SfuEvent.LOAD_MESSAGES_WITH_MENTIONS_RESULT, result);
|
|
1456
1665
|
}
|
|
1457
1666
|
}
|
|
1458
|
-
else if (data[0].type === constants_1.SfuEvent.
|
|
1667
|
+
else if (data[0].type === constants_1.SfuEvent.SEND_MESSAGE_SYNC) {
|
|
1668
|
+
const message = data[0].message;
|
|
1669
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SfuEvent.SEND_MESSAGE_SYNC, message);
|
|
1670
|
+
}
|
|
1671
|
+
else if (data[0].type === constants_1.SfuEvent.AUTHENTICATION_STATUS) {
|
|
1672
|
+
const event = data[0];
|
|
1673
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SfuEvent.AUTHENTICATION_STATUS, event);
|
|
1674
|
+
}
|
|
1675
|
+
else if (data[0].type === constants_1.SpaceEvent.SPACE_CREATED) {
|
|
1676
|
+
const event = data[0];
|
|
1677
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event.space)) {
|
|
1678
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.SPACE_CREATED, event);
|
|
1679
|
+
}
|
|
1680
|
+
}
|
|
1681
|
+
else if (data[0].type === constants_1.SpaceEvent.NEW_SPACE) {
|
|
1682
|
+
const event = data[0];
|
|
1683
|
+
promises_1.default.resolve(data[0].internalMessageId, event.space);
|
|
1684
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.NEW_SPACE, event);
|
|
1685
|
+
}
|
|
1686
|
+
else if (data[0].type === constants_1.SpaceEvent.SPACE_DELETED) {
|
|
1687
|
+
const event = data[0];
|
|
1688
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event.id)) {
|
|
1689
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.SPACE_DELETED, event);
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
else if (data[0].type === constants_1.SpaceEvent.SPACE_OVERVIEW_UPDATED) {
|
|
1459
1693
|
const event = data[0];
|
|
1460
1694
|
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
1461
|
-
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.
|
|
1695
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.SPACE_OVERVIEW_UPDATED, event);
|
|
1462
1696
|
}
|
|
1463
1697
|
}
|
|
1464
|
-
else if (data[0].type === constants_1.
|
|
1465
|
-
const
|
|
1466
|
-
if (!promises_1.default.resolve(data[0].internalMessageId,
|
|
1467
|
-
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.
|
|
1698
|
+
else if (data[0].type === constants_1.SpaceEvent.NEW_SPACE_CATEGORY) {
|
|
1699
|
+
const event = data[0];
|
|
1700
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event.category)) {
|
|
1701
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.NEW_SPACE_CATEGORY, event);
|
|
1468
1702
|
}
|
|
1469
1703
|
}
|
|
1470
|
-
else if (data[0].type === constants_1.
|
|
1704
|
+
else if (data[0].type === constants_1.SpaceEvent.SPACE_CATEGORY_DELETED) {
|
|
1471
1705
|
const event = data[0];
|
|
1472
1706
|
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
1473
|
-
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.
|
|
1707
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.SPACE_CATEGORY_DELETED, event);
|
|
1474
1708
|
}
|
|
1475
1709
|
}
|
|
1476
|
-
else if (data[0].type === constants_1.
|
|
1477
|
-
const
|
|
1478
|
-
|
|
1710
|
+
else if (data[0].type === constants_1.SpaceEvent.SPACE_CATEGORY_UPDATED) {
|
|
1711
|
+
const event = data[0];
|
|
1712
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
1713
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.SPACE_CATEGORY_UPDATED, event);
|
|
1714
|
+
}
|
|
1479
1715
|
}
|
|
1480
|
-
else if (data[0].type === constants_1.
|
|
1716
|
+
else if (data[0].type === constants_1.SpaceEvent.NEW_SPACE_CHANNEL) {
|
|
1481
1717
|
const event = data[0];
|
|
1482
|
-
|
|
1718
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event.channel)) {
|
|
1719
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.NEW_SPACE_CHANNEL, event);
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
else if (data[0].type === constants_1.SpaceEvent.SPACE_CHANNEL_UPDATED) {
|
|
1723
|
+
const event = data[0];
|
|
1724
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
1725
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.SPACE_CHANNEL_UPDATED, event);
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
else if (data[0].type === constants_1.SpaceEvent.SPACE_CHANNEL_DELETED) {
|
|
1729
|
+
const event = data[0];
|
|
1730
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
1731
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.SPACE_CHANNEL_DELETED, event);
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
else if (data[0].type === constants_1.SpaceEvent.SPACE_CHANNEL_MOVED) {
|
|
1735
|
+
const event = data[0];
|
|
1736
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
1737
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.SPACE_CHANNEL_MOVED, event);
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
else if (data[0].type === constants_1.SpaceEvent.NEW_SPACE_THREAD) {
|
|
1741
|
+
const event = data[0];
|
|
1742
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event.thread)) {
|
|
1743
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.NEW_SPACE_THREAD, event);
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
else if (data[0].type === constants_1.SpaceEvent.SPACE_THREAD_UPDATED) {
|
|
1747
|
+
const event = data[0];
|
|
1748
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
1749
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.SPACE_THREAD_UPDATED, event);
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
else if (data[0].type === constants_1.SpaceEvent.SPACE_THREAD_DELETED) {
|
|
1753
|
+
const event = data[0];
|
|
1754
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
1755
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.SPACE_THREAD_DELETED, event);
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1758
|
+
else if (data[0].type === constants_1.SpaceEvent.SPACE_INVITE_CREATED) {
|
|
1759
|
+
const event = data[0];
|
|
1760
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event.invite)) {
|
|
1761
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.SPACE_INVITE_CREATED, event);
|
|
1762
|
+
}
|
|
1763
|
+
}
|
|
1764
|
+
else if (data[0].type === constants_1.SpaceEvent.SPACE_INVITE_REVOKED) {
|
|
1765
|
+
const event = data[0];
|
|
1766
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
1767
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.SPACE_INVITE_REVOKED, event);
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
else if (data[0].type === constants_1.SpaceEvent.NEW_SPACE_ROLE) {
|
|
1771
|
+
const event = data[0];
|
|
1772
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event.role)) {
|
|
1773
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.NEW_SPACE_ROLE, event);
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
else if (data[0].type === constants_1.SpaceEvent.SPACE_ROLE_UPDATED) {
|
|
1777
|
+
const event = data[0];
|
|
1778
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
1779
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.SPACE_ROLE_UPDATED, event);
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
else if (data[0].type === constants_1.SpaceEvent.SPACE_ROLE_DELETED) {
|
|
1783
|
+
const event = data[0];
|
|
1784
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
1785
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.SPACE_ROLE_DELETED, event);
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
else if (data[0].type === constants_1.SpaceEvent.ADDED_ROLE_TO_MEMBER) {
|
|
1789
|
+
const event = data[0];
|
|
1790
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
1791
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.ADDED_ROLE_TO_MEMBER, event);
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
else if (data[0].type === constants_1.SpaceEvent.REMOVED_ROLE_FROM_MEMBER) {
|
|
1795
|
+
const event = data[0];
|
|
1796
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
1797
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.REMOVED_ROLE_FROM_MEMBER, event);
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
else if (data[0].type === constants_1.SpaceEvent.USER_SPACES) {
|
|
1801
|
+
const event = data[0];
|
|
1802
|
+
promises_1.default.resolve(data[0].internalMessageId, event.spaces);
|
|
1803
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.USER_SPACES, event.spaces);
|
|
1804
|
+
}
|
|
1805
|
+
else if (data[0].type === constants_1.SpaceEvent.USER_JOINED_TO_SPACE) {
|
|
1806
|
+
const event = data[0];
|
|
1807
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
1808
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.USER_JOINED_TO_SPACE, event);
|
|
1809
|
+
}
|
|
1810
|
+
}
|
|
1811
|
+
else if (data[0].type === constants_1.SpaceEvent.USER_LEFT_SPACE) {
|
|
1812
|
+
const event = data[0];
|
|
1813
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
1814
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.USER_LEFT_SPACE, event);
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
else if (data[0].type === constants_1.SpaceEvent.ROLE_PERMISSION_SECTIONS) {
|
|
1818
|
+
const event = data[0];
|
|
1819
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event.permissionSections)) {
|
|
1820
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.ROLE_PERMISSION_SECTIONS, event);
|
|
1821
|
+
}
|
|
1483
1822
|
}
|
|
1484
1823
|
else {
|
|
1485
1824
|
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(data[0].type, data[0]);
|
|
@@ -1573,7 +1912,8 @@ _SfuExtended_connection = new WeakMap(), _SfuExtended__user = new WeakMap(), _Sf
|
|
|
1573
1912
|
};
|
|
1574
1913
|
}, _SfuExtended_notifyMessageAttachmentState = function _SfuExtended_notifyMessageAttachmentState(attachment, state) {
|
|
1575
1914
|
const status = {
|
|
1576
|
-
|
|
1915
|
+
targetEntityType: attachment.targetEntityType,
|
|
1916
|
+
targetEntityId: attachment.targetEntityId,
|
|
1577
1917
|
messageId: attachment.messageId,
|
|
1578
1918
|
id: attachment.attachmentId,
|
|
1579
1919
|
name: attachment.name,
|