Move plugins to express-twtkpr-core-plugins package

Add plugin structure
Fix stale cache after posting
Update to v0.9.0
This commit is contained in:
2026-05-12 23:43:26 -04:00
parent 298f267742
commit 8658a14200
103 changed files with 1632 additions and 1996 deletions

View File

@@ -19,7 +19,7 @@ import NodeCache from '@cacheable/node-cache';
export default function followingHandler(
req: Request,
res: Response,
cache: NodeCache<unknown>,
following: Twttr[],
followingParameter: QueryParameters['following']
) {
const followingsToMatch = getQueryParameterArray(
@@ -40,7 +40,7 @@ export default function followingHandler(
if (wantsJson) res.set('content-type', 'application/json');
else res.set('content-type', 'text/plain');
const matchedFollowing = (cache.get('following') as Twttr[]).filter(
const matchedFollowing = following.filter(
({ nick, url }) =>
(!followingsToMatch.length ||
(followingsToMatch.length === 1 && followingsToMatch[0] === '') ||