diff options
Diffstat (limited to 'src/feed-cache.js')
| -rw-r--r-- | src/feed-cache.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/feed-cache.js b/src/feed-cache.js index 2c0b153..a4f3ac9 100644 --- a/src/feed-cache.js +++ b/src/feed-cache.js @@ -6,7 +6,7 @@ export const FEED_SEED_POSTS = 5; const FULL_FEEDS = 4, MAX_FEEDS = 12, MAX_UNITS = 256_000, MAX_AGE = 7 * 86400_000; export function createFeedCache(storage, prefix, now = Date.now) { const keyOf = (id) => id === 'following' ? prefix : prefix + ':' + id; - const valid = (e) => (e?.kind === 1 || e?.kind === 1068) && typeof e.id === 'string' && typeof e.pubkey === 'string' + const valid = (e) => (e?.kind === 1 || e?.kind === 1068 || e?.kind === 1111) && typeof e.id === 'string' && typeof e.pubkey === 'string' && typeof e.content === 'string' && Number.isFinite(e.created_at) && Array.isArray(e.tags); function compact(notes, max = FEED_CACHE_POSTS) { const kept = []; let size = 0; |
