forked from shadowfacts/Tusker
parent
7929e7530f
commit
c3cf38b0c9
|
@ -134,6 +134,16 @@ public class InstanceFeatures: ObservableObject {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public var statusEditNotifications: Bool {
|
||||||
|
// pleroma doesn't seem to support 'update' type notifications, even though it supports edits
|
||||||
|
hasMastodonVersion(3, 5, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
public var statusNotifications: Bool {
|
||||||
|
// pleroma doesn't support notifications for new posts from an account
|
||||||
|
hasMastodonVersion(3, 3, 0)
|
||||||
|
}
|
||||||
|
|
||||||
public var needsEditAttachmentsInSeparateRequest: Bool {
|
public var needsEditAttachmentsInSeparateRequest: Bool {
|
||||||
instanceType.isPleroma(.akkoma(nil))
|
instanceType.isPleroma(.akkoma(nil))
|
||||||
}
|
}
|
||||||
|
|
|
@ -398,6 +398,12 @@ extension NotificationsCollectionViewController {
|
||||||
var types = Set(Notification.Kind.allCases)
|
var types = Set(Notification.Kind.allCases)
|
||||||
types.remove(.unknown)
|
types.remove(.unknown)
|
||||||
allowedTypes.forEach { types.remove($0) }
|
allowedTypes.forEach { types.remove($0) }
|
||||||
|
if !mastodonController.instanceFeatures.statusEditNotifications {
|
||||||
|
types.remove(.update)
|
||||||
|
}
|
||||||
|
if !mastodonController.instanceFeatures.statusNotifications {
|
||||||
|
types.remove(.status)
|
||||||
|
}
|
||||||
return Client.getNotifications(excludedTypes: Array(types), range: range)
|
return Client.getNotifications(excludedTypes: Array(types), range: range)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue