mirror of
https://github.com/svemagie/indiekit-endpoint-microsub.git
synced 2026-04-02 15:35:00 +02:00
fix: wire mark-as-read in timeline view
Items in the cross-channel timeline now carry per-item channel UID so the mark-read API call can target the correct channel. Adds the same dismiss animation used in the channel view.
This commit is contained in:
@@ -1184,10 +1184,10 @@ export async function timeline(request, response) {
|
||||
// Get channels with colors for filtering UI and item decoration
|
||||
const channelList = await getChannelsWithColors(application, userId);
|
||||
|
||||
// Build channel lookup map (ObjectId string -> { name, color })
|
||||
// Build channel lookup map (ObjectId string -> { name, color, uid })
|
||||
const channelMap = new Map();
|
||||
for (const ch of channelList) {
|
||||
channelMap.set(ch._id.toString(), { name: ch.name, color: ch.color });
|
||||
channelMap.set(ch._id.toString(), { name: ch.name, color: ch.color, uid: ch.uid });
|
||||
}
|
||||
|
||||
// Parse excluded channel IDs from query params
|
||||
@@ -1223,6 +1223,7 @@ export async function timeline(request, response) {
|
||||
if (info) {
|
||||
item._channelName = info.name;
|
||||
item._channelColor = info.color;
|
||||
item._channelUid = info.uid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user