mirror of
https://github.com/svemagie/indiekit-endpoint-activitypub.git
synced 2026-04-02 15:44:58 +02:00
feat: add Direct Messages tab to reader view
This commit is contained in:
@@ -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 };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user