fix(notifications): timed mutes are lifted by any Lotus device, not just the one that set them (#333) #393
Merged
jared
merged 1 commits from 2026-10-18 02:22:22 -04:00
fix/mute-timers-account-data into lotus
No Reviewers
Labels
Clear labels
a11y
area: appearance
area: auth-session
area: build-ci
area: calls
area: desktop
area: media
area: messaging
area: mobile
area: moderation
area: navigation
area: notifications
area: settings
area: threads
bug
dependencies
docs
duplicate
enhancement
help wanted
invalid
needs-human-review
performance
planning
priority: critical
priority: high
priority: low
priority: medium
qa
question
research
security
tech-debt
ux
wontfix
Accessibility: keyboard, screen reader, contrast, motion
Client area: appearance
Client area: auth-session
Client area: build-ci
Client area: calls
Client area: desktop
Client area: media
Client area: messaging
Client area: mobile
Client area: moderation
Client area: navigation
Client area: notifications
Client area: settings
Client area: threads
Something is not working
Third-party package versions and advisories
README / LOTUS_* docs wrong or missing
This issue or pull request already exists
New feature
Need some help
Something is wrong
Re-render storms, leaks, heavy work on hot paths
Data loss, security hole, or crash on a main path
Broken feature or serious usability problem
Minor issue or polish
Wrong behaviour in an edge case or notable degradation
Manual QA: shipped, needs a human in a real environment
More information is needed
XSS, unsafe URLs, data leaks, auth/session
Code health, dead code, fragile patterns
Usability or visual inconsistency
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: LotusGuild/cinny#393
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #333.
A timed mute ("Mute for 1 hour") writes a server-side push rule, so the room is muted on every device. The unmute timer, though, lived only in one browser's localStorage:
Change
io.lotus.mute_timers, as{ timers: { [roomId]: unmuteAt } }.MuteTimerRestoreruns on every Lotus device. It schedules from that account data and reschedules whenever it changes, so the first device online after expiry lifts the mute.unmuteRoomkeeps its guard: it doesn't reset a mode the user changed by hand.Verified (two browser sessions of one account, local Synapse):
Unit tests for the account-data format.
tscclean · unit tests pass · ESLint clean.🤖 Generated with Claude Code
https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
A timed mute writes a server-side push rule (muted everywhere), but the unmute timer lived in one browser's localStorage: close that laptop and the room stayed muted on the phone until it was reopened, and forever after a logout there. Timers now live in account data (io.lotus.mute_timers: { timers: { [roomId]: unmuteAt } }). Every client schedules from it, reschedules when it changes, and the first one online after expiry unmutes. An indefinite mute clears a pending timer. Local timers from before are migrated once. Fixes #333 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5