╭ changed ──────────────╮ │src/ui/Repo/Patches.zig│ ╰───────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────╮ │150 assignees: []const ui.Assignee = &.{}, │ │151 // whether the viewer may change the thread, computed here so the web ui has it│ │152 can_modify: bool = false, │ │153 + // the viewer's notify button, null when hidden │ │154 + notify_action: ?ui.NotifyAction = null, │ │155 draft: bool = false, │ │156 revision_oid: []const u8 = "", │ │157 base_oid: []const u8 = "", │ ╰────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │384 │ │385 pub fn publishDraft(data: *const Self, session: *ui.Session, allocator: std.mem.Allocator, author: evt.CommitAuthor, id: []const u8) !void {│ │386 const io = session.io orelse return error.NotFound; │ │385 - const users_dir = session.users_dir orelse return error.NotFound; │ │387 + const server = switch (session.eventHost()) { │ │388 + .server => |server| server, │ │389 + .local => return error.NotFound, │ │390 + }; │ │391 const admin_repo = session.admin_repo orelse return error.NotFound; │ │392 const repo_source = data.repo_source orelse return error.NotFound; │ │393 const repo_id = data.repo_id orelse return error.NotFound; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │398 var target_repo = try rp.AnyRepo(.xit, .{}).open(io, allocator, repo_source.localInitOpts()); │ │399 defer target_repo.deinit(io, allocator); │ │400 switch (target_repo) { │ │396 - inline else => |*repo| try pch.publish(repo.self_repo_opts, io, allocator, users_dir, admin_repo, repo, .{│ │401 + inline else => |*repo| try pch.publish(repo.self_repo_opts, io, allocator, server, admin_repo, repo, .{ │ │402 .id = id_hex, │ │403 .user_id = user_id, │ │404 .repo_id = repo_id, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │410 │ │411 pub fn mergePatch(data: *const Self, session: *ui.Session, allocator: std.mem.Allocator, author: evt.CommitAuthor, id: []const u8, revision: evt.Patch.MergeRevision) !void {│ │412 const io = session.io orelse return error.NotFound; │ │408 - const users_dir = session.users_dir orelse return error.NotFound; │ │413 + const server = switch (session.eventHost()) { │ │414 + .server => |server| server, │ │415 + .local => return error.NotFound, │ │416 + }; │ │417 const repo_source = data.repo_source orelse return error.NotFound; │ │418 if (repo_source.repo_kind != .xit) return error.NotFound; │ │419 const patch_id = evt.parseEventId(id) catch return error.NotFound; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │422 var target_repo = try rp.AnyRepo(.xit, .{}).open(io, allocator, repo_source.localInitOpts()); │ │423 defer target_repo.deinit(io, allocator); │ │424 switch (target_repo) { │ │417 - inline else => |*repo| try pch.mergeAndRemoveFork(repo.self_repo_opts, io, allocator, users_dir, repo, .{│ │425 + inline else => |*repo| try pch.mergeAndRemoveFork(repo.self_repo_opts, io, allocator, server, repo, .{ │ │426 .id = id_hex, │ │427 .revision = revision, │ │428 .author = author, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯