mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-10-31 08:13:50 +00:00
markAsRead, batchMarkAsRead and toggleStar cleared a keyword by patching it to false, sending keywords/$seen: false or keywords/$flagged: false. RFC 8620 section 5.3 removes a property from a PatchObject by setting it to null, and RFC 8621 section 4.1.1 defines the keywords map as holding true for every key, so false is not a valid way to clear one. A server that enforces this rejects the update with invalidProperties. The client does not inspect notUpdated, so marking a message unread or removing a star looked like it had worked, the sidebar counts moved, and the next refresh restored the old state from the server. Stalwart accepts both forms, which is why this went unnoticed. Send null instead, matching removeKeyword and the integration test helpers, which already patch keywords this way.