Skip to content

Commit 66d6900

Browse files
committed
fix
1 parent aa7c7e4 commit 66d6900

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

service/messages.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,7 @@ func (s *MessageService) FetchMessages(ctx context.Context, req *models.FetchMes
242242
}
243243

244244
// Resolve username to Matrix ID using mappings
245-
// The Validate function already matched the userName, so use the first mapping
246-
userID := id.UserID("")
247-
if len(mappings) > 0 {
248-
userID = id.UserID(strings.TrimSpace(mappings[0].MatrixID))
249-
}
245+
userID := s.resolveMatrixUser(userName)
250246
if userID == "" {
251247
logger.Warn().Str("username", userName).Msg("resolved to empty Matrix user ID")
252248
return nil, ErrAuthentication

0 commit comments

Comments
 (0)