From 8bec41b554f94bc7f115a812636846ed779b05ce Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Sat, 7 Oct 2023 19:16:01 +0200 Subject: [PATCH] [mastodon-client] Accept both types and exclude_types at the same time in GET /v1/notifications This ensures compatibility with Mastodon for Android and its forks --- packages/backend/src/server/api/mastodon/helpers/notification.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/backend/src/server/api/mastodon/helpers/notification.ts b/packages/backend/src/server/api/mastodon/helpers/notification.ts index d00637016..8fa64b6a8 100644 --- a/packages/backend/src/server/api/mastodon/helpers/notification.ts +++ b/packages/backend/src/server/api/mastodon/helpers/notification.ts @@ -8,7 +8,6 @@ import { LinkPaginationObject } from "@/server/api/mastodon/middleware/paginatio export class NotificationHelpers { public static async getNotifications(user: ILocalUser, maxId: string | undefined, sinceId: string | undefined, minId: string | undefined, limit: number = 40, types: string[] | undefined, excludeTypes: string[] | undefined, accountId: string | undefined): Promise> { if (limit > 80) limit = 80; - if (types && excludeTypes) throw new Error("types and exclude_types can not be used simultaneously"); let requestedTypes = types ? this.decodeTypes(types)