mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 09:57:29 -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 {
|
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[]>> {
|
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 (limit > 80) limit = 80;
|
||||||
if (types && excludeTypes) throw new Error("types and exclude_types can not be used simultaneously");
|
|
||||||
|
|
||||||
let requestedTypes = types
|
let requestedTypes = types
|
||||||
? this.decodeTypes(types)
|
? this.decodeTypes(types)
|
||||||
|
|
Loading…
Reference in a new issue