mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-25 11:27:31 -07:00
[mastodon-client] Update notifications default and max limit to mastodon v4.1.0 values
This commit is contained in:
parent
4559b135cb
commit
f388eb2135
1 changed files with 2 additions and 2 deletions
|
@ -4,8 +4,8 @@ import { PaginationHelpers } from "@/server/api/mastodon/helpers/pagination.js";
|
||||||
import { Notification } from "@/models/entities/notification.js";
|
import { Notification } from "@/models/entities/notification.js";
|
||||||
|
|
||||||
export class NotificationHelpers {
|
export class NotificationHelpers {
|
||||||
public static async getNotifications(user: ILocalUser, maxId: string | undefined, sinceId: string | undefined, minId: string | undefined, limit: number = 15, types: string[] | undefined, excludeTypes: string[] | undefined, accountId: string | undefined): Promise<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<Notification[]> {
|
||||||
if (limit > 30) limit = 30;
|
if (limit > 80) limit = 80;
|
||||||
if (types && excludeTypes) throw new Error("types and exclude_types can not be used simultaneously");
|
if (types && excludeTypes) throw new Error("types and exclude_types can not be used simultaneously");
|
||||||
|
|
||||||
let requestedTypes = types
|
let requestedTypes = types
|
||||||
|
|
Loading…
Reference in a new issue