forward chat msg fix

This commit is contained in:
Krispire Admin
2026-09-02 23:00:55 +05:30
parent 0fee56d272
commit 6633d0cca3
3 changed files with 134 additions and 0 deletions
+7
View File
@@ -1090,6 +1090,13 @@ func (s *ChatService) ForwardMessage(ctx context.Context, userID, messageID, toC
return nil, err
}
if created {
// Carry the attachments across. Without this a quote, sticker, photo
// or shared post forwards as an empty bubble: its content lives in an
// attachment row, not in the body.
if err := s.chat.CopyAttachments(ctx, messageID, msg.ID, toConversationID); err != nil {
s.logger.Warn("chat: forwarding attachments failed",
zap.String("message_id", messageID), zap.Error(err))
}
msg = s.hydrateSent(ctx, userID, toConversationID, msg)
s.publish(ctx, toConversationID, userID, msg)
}