raiden icon indicating copy to clipboard operation
raiden copied to clipboard

Refactor Matrix Client Callback Handling

Open fredo opened this issue 3 years ago • 0 comments

Description

The way how we handle the callbacks from matrixs sync call was almost copied from the reference implementation by matrix. This led to the fact that we have multiple callbacks for different event types. For example

  • handle_invite
  • handle_member_join
  • handle_message

Now with web rtc we have a second source of incoming messages. The way how the message callback is handled right now, it requires rooms attached to the messaged and is not reusable for incoming messages in web rtc.

Motivation

For historical reasons the callbacks introduced boiler plate code which could be greatly reduced by having a cleaner way of callbacks for the Matrix Client as well as incoming messages from matrix. A bunch of code could be reduced and it would make the already quite large transport code base more maintainable.

fredo avatar Oct 07 '20 19:10 fredo