Open alagane opened 3 years ago
@alagane can you describe a bit more the work to be done, and add a Definition of done?
Added these lines.
We should be able to open a communication channel using websockets to receive StateChange notifications. The library should take care of the authentication.
For now we encounter problems with authentication, because it is not possible to send HTTP headers with websockets for web browsers, and this is blocking. See https://github.com/linagora/james-project-private/pull/99
What do we do once we receive StateChanges from the library?
What do we do once we receive StateChanges from the library?
Well, it is not the responsibility of the library I suppose. Library user can make a /changes
request then.
By lib user you mean inbox app?
By lib user you mean inbox app?
Yes, but there could be other lib users.
Yes, but there could be other lib users.
For sure, I just wanted to be sure of the meaning here. Thanks :)
Push documentation https://jmap.io/spec-core.html#push
We should be able to open a communication channel using websockets to receive StateChange notifications. The library should take care of the authentication.
For an authentication and request example using ticket on James: https://github.com/linagora/tmail-backend/pull/78/files#diff-652928d50d74bf6233709ab2fb095e4909b554d8e6b3ede18785277964803795
Given a client with session fetched
When call the method to get push notifications
And there is an error getting the ticket (Authentication)
Then the returned observable throws an error
Given a client with session fetched
When call the method to get push notifications
And there is an error opening the websocket (with ticket) Then the returned observable throws an error
Given a client with session fetched
When call the method to get Mailbox push notifications
And a Mailbox is added Then the returned observable emits the StateChange for the Mailbox TODO How do we know the observable is ready to receive StateChange when the Mailbox is added?
Given a client with session fetched
When call the method to get Mailbox push notifications
And an Email is added Then the returned observable does not emit the StateChange for the Email TODO How do we know the observable is ready to receive StateChange when the Mailbox is added?