mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +08:00
FIX: Duplicate error for chat messages for upload-only messages (#31539)
This commit fixes an issue where if you tried to post 2 chat messages in quick succession which only contained uploads (both `message` fields would be `""`), then we would show the "You posted an identical message too recently." error. We should not do this for upload-only messages, they are not identical messages.
This commit is contained in:
@ -168,6 +168,10 @@ module Chat
|
||||
Emoji.gsub_emoji_to_unicode(message).truncate(400)
|
||||
end
|
||||
|
||||
def only_uploads?
|
||||
self.message.blank? && self.uploads.present?
|
||||
end
|
||||
|
||||
def to_markdown
|
||||
upload_markdown =
|
||||
self
|
||||
|
Reference in New Issue
Block a user