mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-05-04 19:56:37 +02:00
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) <noreply@anthropic.com>
This commit is contained in:
parent
f7e4100aba
commit
4896b5286a
@ -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`);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user