Skip to content

Commit

Permalink
Improve coment
Browse files Browse the repository at this point in the history
  • Loading branch information
corrideat committed Feb 25, 2025
1 parent 0807e37 commit c136b16
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions frontend/model/notifications/messageReceivePostEffect.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ async function messageReceivePostEffect ({
// This may not be 100% reliable, but `firstSync` should make it work in
// most cases.
const isSyncing = sbp('chelonia/contract/isSyncing', contractID, { firstSync: true })
// TODO: This could be an issue (false negative for emitting a native
// notification) for very large (over 4 KiB) push events, which are
// handled using a sync.
// TODO: This could be an issue (false positive for emitting a native
// notification) when the initial sync gets interrupted (e.g., network issues)
// and then resumed.
// In this case, we may get sound notifications for old events that we
// should not, because technically it's not the first sync.
if (isSyncing) return

const shouldNotifyMessage = messageNotification === MESSAGE_NOTIFY_SETTINGS.ALL_MESSAGES ||
Expand Down

0 comments on commit c136b16

Please sign in to comment.