╭ changed ──╮ │src/try.zig│ ╰───────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │942 } │ │943 } │ │944 │ │945 - // seeding consumed locally, which subscribes nobody, so subscribe admin as the server │ │946 - // would have, then deliver the notifications of its own repos the way the worker does │ │945 + // seeding consumed locally, which notifies nobody, so involve admin in its threads as the │ │946 + // server would have, then deliver each transaction of its own repos │ │947 for (repo_data, repo_event_ids, 0..) |r, id_bytes, repo_index| { │ │948 if (r.user_index != 0) continue; │ │949 const location: evt.RepoLocation = .{ .owner_id = user_ids[r.user_index], .repo_id = id_bytes };│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │950 // only the last repo has patches │ │951 const thread_ids: []const [evt.event_id_size]u8 = if (repo_index + 1 == repo_data.len) &admin_thread_ids else admin_thread_ids[0..2]; │ │952 - for (thread_ids) |*thread_id| try notify.subscribe(io, allocator, users_dir, &admin_user_id, location, thread_id, .{ .name = user_data[0].name, .email = user_data[0].email }); │ │953 - try notify.notifyRepo(io, allocator, users_dir, work_path, location); │ │952 + for (thread_ids) |*thread_id| try notify.writeMode(io, allocator, users_dir, &admin_user_id, &location, thread_id, .involved, .{ .name = user_data[0].name, .email = user_data[0].email });│ │953 + │ │954 + const repo_path = try evt.repoPath(arena.allocator(), users_dir, &location.owner_id, &location.repo_id); │ │955 + var target_repo = try rp.Repo(.xit, .{}).open(io, allocator, .{ .path = repo_path, .require_repo_root = true }); │ │956 + defer target_repo.deinit(io, allocator); │ │957 + const index_cursor = try (try evt.currentMoment(.{}, &target_repo)).getCursor(hash.hashInt(.sha1, evt.moment_index_key)) orelse return error.CursorNotFound; │ │958 + const current = try index_cursor.readUint(); │ │959 + for (0..current + 1) |moment_index| { │ │960 + notify.deliverTransaction(io, allocator, .{ .users_dir = users_dir, .admin_repo_path = work_path }, .{}, &target_repo, moment_index, null, null); │ │961 + } │ │962 } │ │963 │ │964 break :blk try ui.Session.init(&session_arena, &repo, .{ .user_id = &admin_user_id }); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯