Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support push notifications for Mailbox #33

Open
3 tasks
alagane opened this issue Mar 4, 2021 · 7 comments
Open
3 tasks

Support push notifications for Mailbox #33

alagane opened this issue Mar 4, 2021 · 7 comments

Comments

@alagane
Copy link
Member

alagane commented Mar 4, 2021

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

  • Get the ticket (using the url on the session)
  • Use the ticket to open a websocket connection (query parameter)
  • Filter to get only mailboxes ones (will probably need rxjs observables) this is about filtering them when different entities will be subscribed, we will need to be able to get one observable for each kind but only one websocket opened

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?

@alagane alagane self-assigned this Mar 15, 2021
@alagane alagane added this to the FT Inbox Sprint 7 milestone Mar 15, 2021
@chibenwa
Copy link
Member

@alagane can you describe a bit more the work to be done, and add a Definition of done?

@alagane
Copy link
Member Author

alagane commented Mar 18, 2021

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

@chibenwa
Copy link
Member

What do we do once we receive StateChanges from the library?

@alagane
Copy link
Member Author

alagane commented Mar 18, 2021

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.

@Arsnael
Copy link
Member

Arsnael commented Mar 19, 2021

By lib user you mean inbox app?

@alagane
Copy link
Member Author

alagane commented Mar 22, 2021

By lib user you mean inbox app?

Yes, but there could be other lib users.

@Arsnael
Copy link
Member

Arsnael commented Mar 22, 2021

Yes, but there could be other lib users.

For sure, I just wanted to be sure of the meaning here. Thanks :)

@alagane alagane removed their assignment Apr 23, 2021
alagane added a commit to alagane/jmap-client-ts that referenced this issue Apr 29, 2022
alagane added a commit to alagane/jmap-client-ts that referenced this issue May 3, 2022
alagane added a commit to alagane/jmap-client-ts that referenced this issue May 5, 2022
alagane added a commit to alagane/jmap-client-ts that referenced this issue May 5, 2022
alagane added a commit to alagane/jmap-client-ts that referenced this issue May 5, 2022
alagane added a commit to alagane/jmap-client-ts that referenced this issue May 5, 2022
@alagane alagane mentioned this issue May 5, 2022
alagane added a commit to alagane/jmap-client-ts that referenced this issue May 5, 2022
alagane added a commit to alagane/jmap-client-ts that referenced this issue Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants