diff --git a/lib/controllers/reader.js b/lib/controllers/reader.js index 668f02d..e08c6b5 100644 --- a/lib/controllers/reader.js +++ b/lib/controllers/reader.js @@ -47,6 +47,31 @@ export function readerController(mountPath) { // Unread filter const unread = request.query.unread === "1"; + // Direct messages tab — conversation view + if (tab === "direct") { + const csrfToken = getToken(request.session); + const [conversations, unreadCount] = await Promise.all([ + getDirectConversations(collections), + getUnreadNotificationCount(collections), + ]); + return response.render("activitypub-reader", { + title: response.locals.__("activitypub.reader.title"), + readerParent: { href: mountPath, text: response.locals.__("activitypub.title") }, + conversations, + items: [], + tab, + unread: false, + before: null, + after: null, + unreadCount, + unreadTimelineCount: 0, + interactionMap: {}, + csrfToken, + mountPath, + followedTags: [], + }); + } + // Build query options const options = { before, after, limit, unread };