Changeset 1d1fdc9 in Klonkt for src/services/ActivityPubService.js
- Timestamp:
- 09/04/2026 12:17:49 PM (4 days ago)
- Branches:
- main
- Children:
- 6d7ea52
- Parents:
- 9946a68
- File:
-
- 1 edited
-
src/services/ActivityPubService.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ActivityPubService.js
r9946a68 r1d1fdc9 19 19 import fs from 'fs'; 20 20 import path from 'path'; 21 import db, { NU_ISO } from '../config/database.js';21 import db, { NU_ISO, isoSql } from '../config/database.js'; 22 22 import HtmlSanitizerService from './HtmlSanitizerService.js'; 23 23 import AudioEmbedService from './AudioEmbedService.js'; … … 1143 1143 const fanClause = fanOnly ? '' : 'AND (p.fan_only IS NULL OR p.fan_only = 0)'; 1144 1144 const unie = ` 1145 SELECT 'post' AS soort, p.id AS id, COALESCE(p.published_at, p.created_at)AS wanneer1145 SELECT 'post' AS soort, p.id AS id, ${isoSql('COALESCE(p.published_at, p.created_at)')} AS wanneer 1146 1146 FROM posts p WHERE p.site_id = ? AND p.status = 'published' ${fanClause} 1147 1147 UNION ALL … … 1927 1927 FROM posts WHERE site_id = ? AND status = 'published' AND (fan_only IS NULL OR fan_only = 0) 1928 1928 AND IFNULL(ap_visibility, 'public') = 'public' 1929 ORDER BY COALESCE(published_at, created_at)DESC LIMIT 20`1929 ORDER BY ${isoSql('COALESCE(published_at, created_at)')} DESC LIMIT 20` 1930 1930 ).all(site.id).reverse(); 1931 1931 if (!recent.length) return; … … 2085 2085 `SELECT id FROM posts WHERE site_id = ? AND status = 'published' AND (fan_only IS NULL OR fan_only = 0) 2086 2086 AND pinned IS NOT NULL AND pinned > 0 2087 ORDER BY pinned DESC, COALESCE(published_at, created_at)ASC LIMIT 20`2087 ORDER BY pinned DESC, ${isoSql('COALESCE(published_at, created_at)')} ASC LIMIT 20` 2088 2088 ).all(site.id); 2089 2089 const removeIds = [...new Set([...pinned.map((p) => p.id), ...alsoRemove])];
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)