Skip to content

Commit 57b4843

Browse files
committed
fix: map user on fetch messages
1 parent e1a9a4b commit 57b4843

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

service/messages.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func (s *MessageService) SendMessage(ctx context.Context, req *models.SendMessag
116116
// FetchMessages translates Matrix /sync into the Acrobits fetch_messages response.
117117
func (s *MessageService) FetchMessages(ctx context.Context, req *models.FetchMessagesRequest) (*models.FetchMessagesResponse, error) {
118118
// The user to impersonate is taken from the 'Username' field.
119-
userID := id.UserID(req.Username)
119+
userID := s.resolveMatrixUser(strings.TrimSpace(req.Username))
120120
if userID == "" {
121121
logger.Warn().Msg("fetch messages: empty user ID")
122122
return nil, ErrAuthentication

0 commit comments

Comments
 (0)