File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed
Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -1277,7 +1277,11 @@ export class ConversationRepository {
12771277 const userIds = userEntities . map ( userEntity => userEntity . qualifiedId ) ;
12781278
12791279 try {
1280- const response = await this . conversation_service . postMembers ( conversationEntity . id , userIds ) ;
1280+ const response = await this . conversation_service . postMembers (
1281+ conversationEntity . id ,
1282+ userIds ,
1283+ conversationEntity . isFederated ( ) ,
1284+ ) ;
12811285 if ( response ) {
12821286 this . eventRepository . injectEvent ( response , EventRepository . SOURCE . BACKEND_RESPONSE ) ;
12831287 }
Original file line number Diff line number Diff line change @@ -350,11 +350,17 @@ export class ConversationService {
350350 * @param userIds IDs of users to be added to the conversation
351351 * @returns Resolves with the server response
352352 */
353- postMembers ( conversationId : string , userIds : QualifiedId [ ] ) : Promise < ConversationMemberJoinEvent > {
354- return this . apiClient . conversation . api . postMembers (
355- conversationId ,
356- userIds . map ( ( { id} ) => id ) ,
357- ) ;
353+ postMembers (
354+ conversationId : string ,
355+ userIds : QualifiedId [ ] ,
356+ useFederation : boolean ,
357+ ) : Promise < ConversationMemberJoinEvent > {
358+ return useFederation
359+ ? this . apiClient . conversation . api . postMembersV2 ( conversationId , userIds )
360+ : this . apiClient . conversation . api . postMembers (
361+ conversationId ,
362+ userIds . map ( ( { id} ) => id ) ,
363+ ) ;
358364 }
359365
360366 //##############################################################################
You can’t perform that action at this time.
0 commit comments