╭ changed ─────────────╮ │src/ui/Repo/Events.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │171 .repo => (try readRecord(evt.Repo, hash_kind, arena, haxy_moment, id) orelse return error.NotFound).created_ts, │ │172 .issue => (try readRecord(evt.Issue, hash_kind, arena, haxy_moment, id) orelse return error.NotFound).created_ts, │ │173 .comment => (try readRecord(evt.Comment, hash_kind, arena, haxy_moment, id) orelse return error.NotFound).created_ts, │ │174 + .attach => (try readRecord(evt.Attachment, hash_kind, arena, haxy_moment, id) orelse return error.NotFound).created_ts,│ │175 }; │ │176 } │ │177 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │221 const thread_kind = (try readKind(hash_kind, kind_map, &thread_id)) orelse return item; │ │222 const route = switch (thread_kind) { │ │223 .issue => ui.RoutablePage.repoCommentsRoute(identity, &record.event.thread_id, item.id, 0), │ │224 + else => null, │ │225 + } orelse return item; │ │226 + item.view_url = try route.toUrl(arena); │ │227 + }, │ │228 + .attach => { │ │229 + const record = (try readRecord(evt.Attachment, hash_kind, arena, haxy_moment, id)) orelse return null;│ │230 + item.deleted = record.deleted; │ │231 + item.author = try ui.Author.initFromEmail(admin_moment, arena, record.author_email); │ │232 + var parent_id: [evt.event_id_size]u8 = undefined; │ │233 + _ = std.fmt.hexToBytes(&parent_id, &record.event.parent_id) catch return error.InvalidEventId; │ │234 + const parent_kind = (try readKind(hash_kind, kind_map, &parent_id)) orelse return item; │ │235 + const route = switch (parent_kind) { │ │236 + .issue => ui.RoutablePage.repoIssueCommentsRoute(identity, &record.event.parent_id, 0), │ │237 else => null, │ │238 } orelse return item; │ │239 item.view_url = try route.toUrl(arena); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯