status-im / status-protocol-go

Status Protocol implementation in Go
Mozilla Public License 2.0
0 stars 1 forks source link

Replace adapter with message processor #58

Closed adambabik closed 5 years ago

adambabik commented 5 years ago

In the current code organization, adapters do not make much sense. It is confusing what adapters are as a term adapter is quite broad and in many cases its role is solely to forward calls from Messenger to the transport layer.

This PR removes adapters completely and introduces messageProcessor which is responsible for encapsulating logic related to handling received messages as well as encoding, wrapping and encrypting outgoing messages.

messageProcessor mostly took message-related methods and there is no much refactoring. That would be a separate PR later.

Todo