╭ changed ──────╮ │src/ui/User.zig│ ╰───────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │93 _ = try pair.value_cursor.readBytes(&event_id); │ │94 const repo_event = (try evt.Repo.readById(DB, hash_kind, moment, arena, &event_id)) orelse continue; │ │95 // unreadable repos leave their window short rather than shifting the others │ │96 - if (evt.Repo.roleOf(repo_event, session.userId()) == .none) continue; │ │96 + if (try evt.Repo.roleOf(DB, hash_kind, moment, arena, repo_event, &event_id, session.userId()) == .none) continue;│ │97 try repos.append(arena.allocator(), repo_event); │ │98 } │ │99 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │110 const kv_cursor = (try iter.next()) orelse break; │ │111 const repo_id = try evt.readOrderKeyId(DB, kv_cursor); │ │112 const repo_event = (try evt.Repo.readById(DB, hash_kind, moment, arena, &repo_id)) orelse continue; │ │113 - if (evt.Repo.roleOf(repo_event, session.userId()) == .none) continue; │ │113 + if (try evt.Repo.roleOf(DB, hash_kind, moment, arena, repo_event, &repo_id, session.userId()) == .none) continue;│ │114 try repos.append(arena.allocator(), repo_event); │ │115 } │ │116 repos_next_start = if (end < count) end else null; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │135 │ │136 // the target lives in its owner's user repo │ │137 const owner_id = record.event.repo_user_id[0..evt.event_id_size]; │ │138 - const target_repo = (try evt.readRepoById(io, gpa, arena, users_dir, owner_id, record.event.repo_id)) orelse continue; │ │139 - if (evt.Repo.roleOf(target_repo, session.userId()) == .none) continue; │ │138 + const target = (try evt.readRepoById(io, gpa, arena, users_dir, owner_id, record.event.repo_id[0..evt.event_id_size], session.userId())) orelse continue;│ │139 + if (target.role == .none) continue; │ │140 + const target_repo = target.repo; │ │141 │ │142 var title: []const u8 = "(unavailable)"; │ │143 const path = try fork.forkPath(arena.allocator(), users_dir, &user_id, &fork_id); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯