Fix hiding notifications for incompatible clients
This commit is contained in:
parent
b7c90ae1e8
commit
4fecd68d4c
1 changed files with 10 additions and 1 deletions
|
@ -75,7 +75,16 @@ class Api::V1::NotificationsController < Api::BaseController
|
||||||
def exclude_types
|
def exclude_types
|
||||||
val = params.permit(exclude_types: [])[:exclude_types] || []
|
val = params.permit(exclude_types: [])[:exclude_types] || []
|
||||||
val = [val] unless val.is_a?(Enumerable)
|
val = [val] unless val.is_a?(Enumerable)
|
||||||
val
|
val = val << 'emoji_reaction' << 'status' unless new_notification_type_compatible?
|
||||||
|
val.uniq
|
||||||
|
end
|
||||||
|
|
||||||
|
def new_notification_type_compatible?
|
||||||
|
application = doorkeeper_token&.application
|
||||||
|
|
||||||
|
return false if application&.name == 'Tootle for Mastodon'
|
||||||
|
|
||||||
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
def from_account
|
def from_account
|
||||||
|
|
Loading…
Reference in a new issue