feat: add Direct Messages tab to reader view

This commit is contained in:
svemagie
2026-03-13 07:36:09 +01:00
parent 1b2554618e
commit 364c41cba7

View File

@@ -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 };