From 461df1d9b4b2daecfd3de61f3496a17c181f099c Mon Sep 17 00:00:00 2001 From: highesttt Date: Thu, 17 Sep 2026 15:45:15 -0400 Subject: [PATCH] chatsync: fixed sync resetting accepted chats --- pkg/connector/chatsync.go | 8 +++----- pkg/connector/handlematrix.go | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pkg/connector/chatsync.go b/pkg/connector/chatsync.go index e151a12..8495481 100644 --- a/pkg/connector/chatsync.go +++ b/pkg/connector/chatsync.go @@ -863,13 +863,11 @@ func (tc *TwitterClient) conversationToChatInfo(ctx context.Context, conv *types } } - messageRequest := !conv.Trusted - info := &bridgev2.ChatInfo{ - Members: tc.buildChatMembersFromUserIDs(ctx, conv.ConversationID, participantIDs, inbox), - CanBackfill: true, - MessageRequest: &messageRequest, + Members: tc.buildChatMembersFromUserIDs(ctx, conv.ConversationID, participantIDs, inbox), + CanBackfill: true, } + applyXChatTrustToChatInfo(info, conv.Trusted) isGroup := conv.Type == ConversationTypeGroupDM if isGroup { diff --git a/pkg/connector/handlematrix.go b/pkg/connector/handlematrix.go index e23371c..4f2483e 100644 --- a/pkg/connector/handlematrix.go +++ b/pkg/connector/handlematrix.go @@ -1023,8 +1023,8 @@ func (tc *TwitterClient) HandleMatrixAcceptMessageRequest(ctx context.Context, m err = nil } if err == nil && msg != nil && msg.Portal != nil { - meta, ok := msg.Portal.Metadata.(*PortalMetadata) - if ok && meta.IsXChatConversation() { + _, ok := msg.Portal.Metadata.(*PortalMetadata) + if ok { chatInfo := &bridgev2.ChatInfo{} applyXChatTrustToChatInfo(chatInfo, true) msg.Portal.UpdateInfo(ctx, chatInfo, tc.userLogin, nil, time.Time{})