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

fix: fetch history when back online #4651

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

igor-sirotin
Copy link
Collaborator

Fixes status-im/status-desktop#13270

If internet connection was lost, we should make a history request to get the missed messages.

// Start fetching messages from store nodes
if online {
m.asyncRequestAllHistoricMessages()
}

Also made some minor refactoring and added some useful logs on the way.

@status-im-auto
Copy link
Member

status-im-auto commented Jan 30, 2024

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ c2823b6 #1 2024-01-30 16:25:53 ~3 min linux 📦zip
✔️ c2823b6 #1 2024-01-30 16:27:18 ~4 min ios 📦zip
✔️ c2823b6 #1 2024-01-30 16:27:53 ~5 min android 📦aar
✔️ c2823b6 #1 2024-01-30 17:00:51 ~38 min tests 📄log

Copy link
Contributor

@osmaczko osmaczko left a comment

Choose a reason for hiding this comment

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

I suppose it is not straightforward to cover it with tests, is it?

@igor-sirotin
Copy link
Collaborator Author

I suppose it is not straightforward to cover it with tests, is it?

Yeah I don't think that's easy, I thought of that. Probably possible, but don't really want to hold this changes.
I'll make a quick attempt and see how difficult it is!

@igor-sirotin
Copy link
Collaborator Author

igor-sirotin commented Jan 30, 2024

Seems that implementing a test is possible.
But it will take a while, so I'll merge this meanwhile and implement a test this week: #4653

@igor-sirotin igor-sirotin merged commit 0c2a935 into develop Jan 30, 2024
7 checks passed
@igor-sirotin igor-sirotin deleted the fix/fetch-messages-on-back-online branch January 30, 2024 18:13
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.

Shards.test: messages are not received instantly, restart is required when updating from 0.14 to 0.15
5 participants