forward chat msg fix
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user