iceshrimp/packages/backend/src/server/api/mastodon/middleware/filter-context.ts
Laura Hausmann 03cdf4ec4a
[mastodon-client] Add basic support for filters
Currently you have to configure these in the web ui, but this will eventually be implemented as well
2023-11-27 21:41:09 +01:00

9 lines
268 B
TypeScript

import { MastoContext } from "@/server/api/mastodon/index.js";
export function filterContext(context: string) {
return async function filterContext(ctx: MastoContext, next: () => Promise<any>) {
ctx.filterContext = context;
await next();
};
}