@ -22,6 +22,7 @@ class Announcement < ApplicationRecord
scope:published,->{where(published:true)}
scope:published,->{where(published:true)}
scope:without_muted,->(account){joins("LEFT OUTER JOIN announcement_mutes ON announcement_mutes.announcement_id = announcements.id AND announcement_mutes.account_id = #{account.id}").where('announcement_mutes.id IS NULL')}
scope:without_muted,->(account){joins("LEFT OUTER JOIN announcement_mutes ON announcement_mutes.announcement_id = announcements.id AND announcement_mutes.account_id = #{account.id}").where('announcement_mutes.id IS NULL')}