From 4896b5286a6abf1492caeaddd045d7ceaf69070c Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 5 Apr 2026 00:25:20 +0100 Subject: [PATCH] fix: add padId to padUpdate/padCreate hook context (#7452) The pad object's toJSON() intentionally strips the id property (since it's part of the database key), which caused confusion when plugins serialized the hook context. Adding padId as a top-level property on the hook context makes it directly accessible without relying on the pad object's internal properties. Fixes #5814 Co-authored-by: Claude Opus 4.6 (1M context) --- src/node/db/Pad.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node/db/Pad.ts b/src/node/db/Pad.ts index 0fded8975..2789f1867 100644 --- a/src/node/db/Pad.ts +++ b/src/node/db/Pad.ts @@ -125,6 +125,7 @@ class Pad { authorId && authorManager.addPad(authorId, this.id), hooks.aCallAll(hook, { pad: this, + padId: this.id, authorId, get author() { pad_utils.warnDeprecated(`${hook} hook author context is deprecated; use authorId instead`);