fix: attachment rendering if the message content is empty in private note (#1831)

Fixes #1830
This commit is contained in:
Muhsin Keloth
2021-02-25 09:10:03 -08:00
committed by GitHub
parent 00954aa16f
commit aab70bf1f1
2 changed files with 32 additions and 5 deletions

View File

@@ -56,6 +56,8 @@ class NotificationListener < BaseListener
def generate_notifications_for_mentions(message, account)
return unless message.private?
return if message.content.blank?
mentioned_ids = message.content.scan(%r{\(mention://(user|team)/(\d+)/(.+)\)}).map(&:second).uniq
return if mentioned_ids.blank?