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

activity: fix init unreads #3797

Merged
merged 11 commits into from
Jul 26, 2024
Merged

activity: fix init unreads #3797

merged 11 commits into from
Jul 26, 2024

Conversation

arthyn
Copy link
Member

@arthyn arthyn commented Jul 25, 2024

Fixes TLON-2447 by adding a new state transition that will run a fix. The fix looks for any DM or channel sources with only one event which should be either %dm-invite or %chan-init and sets the floor to the last-read time from the old agents. If this is actually an invite pending, then it will stay unread which is what we want. If it's not pending and they had in fact previously interacted and read that channel, then it will be marked read.

Unfortunately, to call these migration methods I had to factor them out to be pure so that we could call them on old state. Sync reads tests still pass, going to write some for this fix scenario.

PR Checklist

  • Includes changes to desk files
  • Describes how you tested the PR locally (test ship vs livenet)
  • If a new feature, includes automated tests
  • Comments added anywhere logic may be confusing without context

Copy link

linear bot commented Jul 25, 2024

@arthyn arthyn requested a review from Fang- July 25, 2024 21:53
Copy link
Member

@Fang- Fang- left a comment

Choose a reason for hiding this comment

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

This looks like what we reviewed out of band yesterday. Nothing serious, just some small clean-up things.

desk/lib/test-agent.hoon Outdated Show resolved Hide resolved
desk/app/activity.hoon Outdated Show resolved Hide resolved
desk/app/activity.hoon Outdated Show resolved Hide resolved
desk/app/activity.hoon Outdated Show resolved Hide resolved
arthyn and others added 4 commits July 26, 2024 13:50
Co-authored-by: fang <git@fang.io>
Co-authored-by: fang <git@fang.io>
Co-authored-by: fang <git@fang.io>
Co-authored-by: fang <git@fang.io>
@arthyn arthyn merged commit d2e3992 into staging Jul 26, 2024
1 check passed
@arthyn arthyn deleted the hm/fix-init-unreads branch July 26, 2024 19:02
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.

2 participants