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(chat): offline msgs order #4794

Merged
merged 2 commits into from
Sep 16, 2022
Merged

fix(chat): offline msgs order #4794

merged 2 commits into from
Sep 16, 2022

Conversation

molimauro
Copy link
Contributor

What this PR does 📖

  • Fix the offline message communication order so that reactions and edits wont be lost or overwritten

Which issue(s) this PR fixes 🔨

Special notes for reviewers 🗒️

Additional comments 🎤

After this we can merge #4755 too

@github-actions github-actions bot added the Missing Dev Review A Dev and a Dev Approver need to review the PR, then mark as Ready for QA label Sep 14, 2022
Copy link
Contributor

@aewing aewing left a comment

Choose a reason for hiding this comment

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

🛳

message.payload.body.messages
.sort((a, b) => a.createdAt - b.createdAt)
.map(async (message) => {
const stored = await iridium.connector?.dag.get(
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can use iridium.load and skip the manual decryption step

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for some reasons the await iridium.connector?.load(msg.cid) fails:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thats because on iridium it loads this:

image

we should have object.body instead, where is the error? on core when storing the message?

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, maybe something about the structure of the payload. I'll take a look in a followup.

@WanderingHogan
Copy link
Contributor

I am seeing weird issues where the offline messages don't come in consistently, or they will show up, then on reload they dissapear. Do you think this should be looked at in a follow up pr? Or maybe it works with your edit message pr, i will check that out now

@molimauro
Copy link
Contributor Author

Those should not be related to these PRs, are you experiencing the same on dev?

@phillsatellite
Copy link
Contributor

@molimauro I also tested this one as well and wanted to leave a little note of my findings. I was able to add friends and send messages from both sides and still not receive them on either side

Screen.Recording.2022-09-14.at.1.47.31.PM.mov

@molimauro
Copy link
Contributor Author

molimauro commented Sep 15, 2022

@phillsatellite i tried and they worked on my side but ill try to dig more

@aewing
Copy link
Contributor

aewing commented Sep 16, 2022

I think the inconsistency should be addressed in recently merged branches. if not I will follow up on this.

@aewing aewing merged commit b036493 into dev Sep 16, 2022
@aewing aewing deleted the fix_offline_messages branch September 16, 2022 00:21
@github-actions github-actions bot removed the Missing Dev Review A Dev and a Dev Approver need to review the PR, then mark as Ready for QA label Sep 16, 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

Successfully merging this pull request may close these issues.

Message reactions and edits
4 participants