Skip to content

Refactor reactions

James Graham requested to merge work/nvrwhere/refactor_reactions into master

Currently we effectively create the reactions list in EventHandler then pass that data into a model. This reworks the model so that we just pass in a room and an event and it grabs it's own data. This means that:

  • the functions in event handler are no longer required
  • the model can update itself to add/remove reactions so no need to handle that in MessageEventModel
  • MessageEventModel only needs to create new ReactionModels or remove old ones when no reactions exist anymore

A basic test suite has also been created for the ReactionModel

Merge request reports

Loading