mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-13 13:37:31 -07:00
[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
This commit is contained in:
parent
1cb935f483
commit
8bec41b554
1 changed files with 0 additions and 1 deletions
|
@ -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<LinkPaginationObject<Notification[]>> {
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue