Changeset 9946a68 in Klonkt for src/services/ap-inbox.js
- Timestamp:
- 09/04/2026 12:12:19 PM (5 days ago)
- Branches:
- main
- Children:
- 1d1fdc9
- Parents:
- 8151340
- File:
-
- 1 edited
-
src/services/ap-inbox.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ap-inbox.js
r8151340 r9946a68 17 17 * guardian-broers in de dienst, zoals gateOutgoingFollow bij stap 7. 18 18 */ 19 import db from '../config/database.js';19 import db, { NU_ISO } from '../config/database.js'; 20 20 import HtmlSanitizerService from './HtmlSanitizerService.js'; 21 21 import * as Guardianship from './guardianship/index.js'; … … 130 130 if (++_seenSinceSnoei >= 500) { 131 131 _seenSinceSnoei = 0; 132 const r = db.prepare(`DELETE FROM ap_seen_notes WHERE created_at< datetime('now', '-${SEEN_NOTES_DAYS} days')`).run();132 const r = db.prepare(`DELETE FROM ap_seen_notes WHERE datetime(created_at) < datetime('now', '-${SEEN_NOTES_DAYS} days')`).run(); 133 133 if (r.changes) console.log(`[AP] seen notes: ${r.changes} pruned`); 134 134 } … … 751 751 const ouder = safeUrl(typeof o.inReplyTo === 'string' ? o.inReplyTo : (o.inReplyTo && o.inReplyTo.id)) || null; 752 752 const r = db.prepare(`INSERT OR IGNORE INTO ap_mentions (slug, object_uri, note_url, actor_uri, actor_name, actor_handle, actor_icon, actor_url, content, published, in_reply_to, help_request, wave, has_guardians, emoji_json, actor_emoji_json, media_json, created_at) 753 VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, CURRENT_TIMESTAMP)`)753 VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,${NU_ISO})`) 754 754 .run(slug, o.id, safeUrl(o.url) || null, actorUri, ai.name, ai.handle, ai.icon, ai.url, html, o.published || null, ouder, help ? 1 : 0, wave ? 1 : 0, hasG ? 1 : 0, 755 755 extractEmojiTags(o.tag), emojiJsonOf(ai.emojis), mediaFromNote(o));
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)