mirror of
https://github.com/kikobar/mastodon.git
synced 2024-12-26 15:54:23 +00:00
This commit is contained in:
parent
2587fcdd27
commit
cdbdf7f98b
|
@ -80,7 +80,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
||||||
hashtag = tag['name'].gsub(/\A#/, '').mb_chars.downcase
|
hashtag = tag['name'].gsub(/\A#/, '').mb_chars.downcase
|
||||||
hashtag = Tag.where(name: hashtag).first_or_initialize(name: hashtag)
|
hashtag = Tag.where(name: hashtag).first_or_initialize(name: hashtag)
|
||||||
|
|
||||||
status.tags << hashtag
|
status.tags << hashtag unless status.tags.include?(hashtag)
|
||||||
rescue ActiveRecord::RecordInvalid
|
rescue ActiveRecord::RecordInvalid
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue