Skip to content

Add reaction Filter to getReactionCounts #5

@Silent-Watcher

Description

@Silent-Watcher

Feature: Filter getReactionCounts by Reaction Type

Description:
Extend the getReactionCounts method to accept an optional array of reaction types to filter by. Instead of returning all counts, it only returns counts for the specified reactions.

Acceptance Criteria:

  • Method signature: Model.getReactionCounts(reactableId, reactions?: string[]).
  • If reactions array is provided, the aggregation pipeline filters to only those types.
  • If reactions is undefined, behavior is unchanged (returns all).
  • Method is fully typed.
  • Tests are added for the new filtered behavior.
  • Add usage examples in docs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions