Moin
16 בדצמבר, 2025, 11:22pm
1
Continuing the discussion from Toggling the "AI search discoveries" preference doesn't work :
Is there any chance that this broke the chat email preference at https://meta.discourse.org/my/preferences/emails ? I think when the PR was created, the chat setting still worked. IIRC, I tried because I was curious if that plugin setting was broken too, and at that time it was not. But now I cannot disable chat emails on my forum and on Meta.
3 לייקים
lindsey
(Lindsey Fogle)
17 בדצמבר, 2025, 1:38pm
7
Hey @Moin , quick update that we’re looking into this and we’ll be in touch with a more substantial update soon.
2 לייקים
Moin
18 בדצמבר, 2025, 5:23pm
9
I was able to successfully disable email notifications about chat messages for the test user in my forum
It was probably fixed in
main ← dev-add-page-specific-saving-to-plugin-api
merged 09:58AM - 18 Dec 25 UTC
Previously, plugins that needed to save user preferences on specific preference … pages had to either:
1. Manually register value transformers for `preferences-save-attributes`
2. Use `modifyClass` to push fields to `saveAttrNames`
The second approach was broken because `saveAttrNames` is now a getter that returns a fresh array each time, so pushed values were lost.
This commit introduces three new plugin APIs that handle the transformer registration automatically:
- `addSaveableUserOption(name, { page })` - for `user_options` table fields
- `addSaveableUserField(name, { page })` - for `user_fields` table fields
- `addSaveableCustomFields(page)` - ensures `custom_fields` object is saved on a page (auto-deduplicates across plugins)
The `{ page }` option specifies which preferences page triggers saving: "account", "emails", "interface", "notifications", "profile", "tracking", etc.
Also updates bundled plugins to use the new APIs:
- chat: `addSaveableUserOption` with `{ page: "emails" }` for email frequency
- discourse-ai: `addSaveableUserOption` with `{ page: "interface" }`
- discourse-assign: `addSaveableUserOption` with `{ page: "tracking" }`, `addSaveableCustomFields` with `"notifications"`
- discourse-policy: `addSaveableUserOption` with `{ page: "emails" }`
- discourse-rewind: `addSaveableUserOption` (no page, custom prefs page)
Deprecates `addSaveableUserOptionField` in favor of `addSaveableUserOption`.
Ref - https://meta.discourse.org/t/391509
Follow up to ee1a1c7219fea70215300c9bf81ce215a09ce17b
לייק 1
lindsey
(Lindsey Fogle)
18 בדצמבר, 2025, 5:33pm
10
Yes! @zogstrip fixed this up in core and is working through the impacted plugins now too.