@@ -2391,10 +2391,10 @@ export class ConversationRepository {
23912391 */
23922392 private onMemberUpdate (
23932393 conversationEntity : Conversation ,
2394- eventJson : Pick < ConversationMemberUpdateEvent , 'data' | 'from' > ,
2394+ eventJson : Pick < ConversationMemberUpdateEvent , 'data' | 'from' > & { conversation ?: string } ,
23952395 ) {
2396- const { data : eventData , from} = eventJson ;
2397- const conversationId = conversationEntity . qualifiedId ;
2396+ const { conversation , data : eventData , from} = eventJson ;
2397+ const conversationId = { domain : '' , id : conversation || '' /* TODO(federation) add domain on the sender side */ } ;
23982398
23992399 const isConversationRoleUpdate = ! ! eventData . conversation_role ;
24002400 if ( isConversationRoleUpdate ) {
@@ -2414,7 +2414,7 @@ export class ConversationRepository {
24142414 const isBackendEvent = eventData . otr_archived_ref || eventData . otr_muted_ref ;
24152415 const selfConversation = this . conversationState . self_conversation ( ) ;
24162416 const inSelfConversation = selfConversation && matchQualifiedIds ( selfConversation , conversationId ) ;
2417- if ( ! inSelfConversation && conversationId && ! isBackendEvent ) {
2417+ if ( ! inSelfConversation && conversation && ! isBackendEvent ) {
24182418 throw new ConversationError (
24192419 ConversationError . TYPE . WRONG_CONVERSATION ,
24202420 ConversationError . MESSAGE . WRONG_CONVERSATION ,
0 commit comments