Improvement: Standardize toggleReaction Return Value
Description:
Currently, toggleReaction returns different object shapes ({removed: true}, {createdReaction}, {createdOrUpdated}). Refactor it to always return a consistent shape: { action: 'added' | 'removed', doc: ReactionDoc | null }.
Acceptance Criteria:
Improvement: Standardize
toggleReactionReturn ValueDescription:
Currently,
toggleReactionreturns different object shapes ({removed: true},{createdReaction},{createdOrUpdated}). Refactor it to always return a consistent shape:{ action: 'added' | 'removed', doc: ReactionDoc | null }.Acceptance Criteria:
actionproperty clearly indicates what occurred.docisnullon removal, or the reaction document on add/update.