The next service will be used to block messages from a given user. It must return an observable, and this observable cannot propagate messages sent by the blocked user.
Our service will have the following signature:
It receives two parameters, but only the first is mandatory:
- payload: This is an object containing information about the user to be blocked; it must have two properties:
- me: This property is mandatory, it is a string representing the user listening to messages
- blocked: This property is mandatory, it is a string representing the user to be blocked
- observable: The observable where messages for this user are pushed
Our service must implement the ...