]> cat aescling's git repositories - mastodon.git/commitdiff
Fix type error in announcement reaction update event payload (#12946)
authorThibG <thib@sitedethib.com>
Fri, 24 Jan 2020 21:08:24 +0000 (22:08 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Fri, 24 Jan 2020 21:08:24 +0000 (22:08 +0100)
app/workers/publish_announcement_reaction_worker.rb

index 6f3b6dc5b6bc45e4d30391ad2049a0e14e0cf452..e01deb64dd8021d21e1b32e0c77d9fb87c43a742 100644 (file)
@@ -10,7 +10,7 @@ class PublishAnnouncementReactionWorker
     reaction,  = announcement.announcement_reactions.where(name: name).group(:announcement_id, :name, :custom_emoji_id).select('name, custom_emoji_id, count(*) as count, false as me')
     reaction ||= announcement.announcement_reactions.new(name: name)
 
-    payload = InlineRenderer.render(reaction, nil, :reaction).tap { |h| h[:announcement_id] = announcement_id }
+    payload = InlineRenderer.render(reaction, nil, :reaction).tap { |h| h[:announcement_id] = announcement_id.to_s }
     payload = Oj.dump(event: :'announcement.reaction', payload: payload)
 
     Account.joins(:user).where('users.current_sign_in_at > ?', User::ACTIVE_DURATION.ago).find_each do |account|