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

[WIP] TF-3157 Implement web socket push #3168

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

tddang-linagora
Copy link
Contributor

@tddang-linagora tddang-linagora commented Sep 23, 2024

Copy link

This PR has been deployed to https://linagora.github.io/tmail-flutter/3168.

@dab246
Copy link
Member

dab246 commented Sep 24, 2024

  • Verify web socket when token expired
  • Verify web socket on background mode

@tddang-linagora tddang-linagora changed the title [WIP] TF-3157 Implement web socket push TF-3157 Implement web socket push Sep 25, 2024
@hoangdat hoangdat changed the title TF-3157 Implement web socket push [WIP] TF-3157 Implement web socket push Sep 26, 2024
@@ -7,4 +7,5 @@ class Constant {
static const octetStreamMimeType = 'application/octet-stream';
static const pdfExtension = '.pdf';
static const imageType = 'image';
static const websocketBroadcastChannel = 'background-message';
Copy link
Member

@hoangdat hoangdat Oct 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
static const websocketBroadcastChannel = 'background-message';
static const wsServiceWorkerBroadcastChannel = 'background-message';

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

## Context

- Currently Twake Mail web use Firebase Cloud Messaging to sync data on real time
- JMAP already implement web socket push, which is more optimized for web
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- JMAP already implement web socket push, which is more optimized for web
- JMAP already implemented web socket push, which is more optimized for web

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still not well understand about the logic of this file. Can you more details @dab246 ?

this.session = session;
}

void mappingTypeStateToAction(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add test for this method.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

web/web-sockets-worker.js Outdated Show resolved Hide resolved
);

// assert
verify(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should make sure mailboxChangeListener should not be invoked

);

// assert
verify(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should make sure mailboxChangeListener should not be invoked

);

// assert
verify(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should make sure emailChangeListener should not be invoked

);

// assert
verify(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem

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

Successfully merging this pull request may close these issues.

4 participants