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

Don't send push notifications to users who are clearly active on a device #360

Open
7 of 9 tasks
dbkr opened this issue Dec 3, 2015 · 41 comments
Open
7 of 9 tasks
Assignees
Labels
A-Notifications O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Minor Impairs non-critical functionality or suitable workarounds exist T-Enhancement

Comments

@dbkr
Copy link
Member

dbkr commented Dec 3, 2015

This is a bug to track the various different bugs related to aspects of tracking what we've seen/read between clients:

High priority:

  • accurate synchronised unread state per-room (ie. number of regular messages unread or in vector, room boldness) (critical);
  • accurate highlight state per-room (subset of notif counts) (hopefully we have it already);
  • accurate badge counts on the favicon of the client

Lower priority:

  • accurate notification counts per-room (not that we show them in the UI currently, so it could be skipped)
  • self-read-up-to-marker
  • jumping to arbitrary message offsets (unrelated, basically)
  • push notification badge counts (not a blocker for v0)
  • synchronising whether you push a user with whether they are currently active on a device, or have sent a read receipt, or whatever (not a blocker for v0)

Also need to show highlights somehow for rooms that are scrolled out of view on the RoomList or in a collapsed RoomSubList.

Immediate priorities:
Tracking unread per room, tracking highlights per room, ensuring they are synchronised between clients, and maintaining a favicon badge

App specific issues

@dbkr
Copy link
Member Author

dbkr commented Dec 4, 2015

What we need now for the unread / bing counts:

  • Unread notification count per room in event stream
  • Notification actions attached to each event in event stream

@ara4n ara4n added the P1 label Dec 9, 2015
@ara4n
Copy link
Member

ara4n commented Dec 9, 2015

One other aspect here could be only setting reset pushes for messages that you know the user has actually read. E.g. if I read messages in one room, I expect them to disappear from my list of mobile pushes. But it's unintuitive if other messages I haven't read yet then disappear from my mobile push list.

@dbkr
Copy link
Member Author

dbkr commented Dec 9, 2015

Note that APNS has no concept of a reset push for a message: you can set the badge count to zero which causes all the notifications to disappear, otherwise they all stay.

@dbkr
Copy link
Member Author

dbkr commented Dec 14, 2015

https://matrix.org/jira/browse/SPEC-303 tracks how we decide whether a given room is unread

@ara4n
Copy link
Member

ara4n commented Dec 15, 2015

[Matthew]
so: suggestion is that we handle 3 different custom room states in vector-web: unread, notify and highlight
unread is calculated on the client, and would make the room title go black & bold.
the rules for what message types count as unread are hardcoded for now (everything except for: membership changes, call candidates/hangup, and m.notify?)
but in future could be defined as part of the pushrules.
notify == event you would be pushed for. these make room title go green and bold.
highlight == event you would be highlighted for. these make the room title go red and bold
by default highlighting are messages which reference you by name, or are 1:1
you can also configure custom things to cause a 'highlight' in push rules, as we do already today.
finally, we either track 'badge counts' for notify or highlight events.
and this is done serverside to avoid having to shove loads of explicit notify/highlight events down the eventstream
by default 1:1 convos would be highlit already.
so additional highlights within that convo would do nothing, unless you somehow turn off highlighting for your 1:1s, which presumably could be a configuration option via push rules.
so the only open question, assuming Amandine agrees with this, is whether badge counts should show highlights (aka mentions) or notifies.
for now, i suggest badge counts show the number of pending notifies, but we perhaps make it configurable in future depending on how it feels.
as intuitively I really think that I expect the badge count on an app to show me the number of pushes i've missed
rather than the number of i've missed.
"missed pushes" is basically how FB and Twitter do it, aiui.

[Amandine] ok, and let's see because I suspect it can really become useless at some point
[Matthew] quite possibly. but it should be trivial to change
[Dave] what amandine's suggesting is essentially a count of things which are directed at you personally, or individual events you've asked to be called out
[Amandine] but agreed athat "number of pushes I missed" is a clear explanation

@ara4n ara4n removed the P1 label Jan 13, 2016
@ara4n
Copy link
Member

ara4n commented Jan 13, 2016

deprioritising from p1 to p2 as the 'jump to old read receipt' behaviour isn't a hard hard blocker on v0

@dbkr
Copy link
Member Author

dbkr commented Jan 14, 2016

Badge counts are fixed on https://github.com/matrix-org/synapse/tree/push_badge_counts but requires the new notification code which is currently disabled.

@dbkr
Copy link
Member Author

dbkr commented Mar 7, 2016

Should this still be v0?

@t3chguy
Copy link
Member

t3chguy commented May 27, 2017

element-hq/element-web#3432 has some discussion also

@oliverjanik
Copy link

What are the current rules regarding active users and notifications?

I seem to have issue where a recently active user does not get a notification even though their app is closed.

@Logicwax
Copy link

what is the current status of how push notifications are synced across devices? From December 2018 to around March 2019, my company hosted its own matrix servers (my apologies for not knowing the version numbers) and this was how I was introduced to matrix for the first time. I absolutely loved that when I read a private message on any of the desktop clients (including the web one), the push notification pop-up on my iOS lockscreen would vanish. Ever since we updated servers, and then eventually moved to modular.im hosting, this awesome feature has been missing. If I chat with someone on my desktop, I'll later find my phone has 10s to 100s of unread push notifications from our conversation (not in the client, but the OS-level push notification queue).

@Faldrian
Copy link

A few friends of mine are trying the matrix stack to evaluate if we move to it or not... and notifications not being cleared when read on another client is a huge problem. This will get annoing very fast.
Currently we are using synapse 1.17.0, riot web 1.7.2 and riot android 1.0.4.

What @Logicwax described as the former behavior would be the "we want that" state. Similar to how telegram behaves. :)

@jesanfafon
Copy link

Just like @Faldrian commented - I am in the same boat. I'm trying to move over to the matrix stack, but having to mute riot android every time I'm communicating on the desktop app is a severe regression over Signal, which I'm currently using.

@amstan
Copy link

amstan commented Dec 26, 2020

Re @Faldrian

and notifications not being cleared when read on another client is a huge problem.

I filed issue element-hq/element-web#16026, notifications just never get cleared by element web (either when you read in the same client or another client), It was a 1 liner fix.

@pszypowicz
Copy link

I tried to migrate couple of users to the matrix im. The ones who actually use it, and install it on the phone and laptop are very bothered that the notifications goes on for every message they receive on the phone, while typing on the pc. This problem is even worse when a user have an apple watch.

I'm trying to provide a workaround for them, or they will simply leave matrix. The only thing I can come up with, is to turn off the notifications on mobile/watch. But is sounds like a disaster when they will miss something important.

Is there a better way to handle that?

@pszypowicz
Copy link

I wanted to leave my 5 cents additionally here :)

https://www.bountysource.com/issues/28824980-don-t-send-push-notifications-to-users-who-are-clearly-active-on-a-device

There is a bountysource available from now on!

@aethralis
Copy link

This is the most problematic issue for me at the moment. I have to keep silencing my phone because otherwise it just drives me crazy. Really wondering how difficult it would be to resolve this?

@SimonBrandner SimonBrandner added O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Minor Impairs non-critical functionality or suitable workarounds exist and removed P2 labels Nov 5, 2021
@rbuddy101
Copy link

Doubled the bounty myself as this is the most problematic issue for most users.
Thanks in advance

@rwjack
Copy link

rwjack commented Jun 18, 2022

Any updates on this?
I'm confident it is possible to resolve this if enough energy is directed towards the issue.
We're literally being chased by 7 year old bug, as if it were a ghost!

@kellyclowers
Copy link

Yeah this is a big problem for me, extremely annoying to a sound sensitive person like myself to be chatting on the computer with someone and their responses are making my phone beep at me.

(also I think there should be a short delay + roll up period, so if someone types many short messages in quick succession, you only get one sound for notification instead of 5 or 6 or whatever... but that's another issue)

@rwjack
Copy link

rwjack commented Mar 26, 2023

image

@ghost
Copy link

ghost commented Apr 19, 2023

Wow.. the issue is nearly 8 Years old and still unresolved...

And it still makes the user experience awful..

@dtheodor
Copy link

dtheodor commented May 4, 2023

Why is this S-Minor? You are a messenger, getting notifications right is an important requirement don't you think? Teams and Slack do this right.

@marinkol
Copy link

marinkol commented May 8, 2023

After convincing my upper management, to try out matrix, to replace our current messenger, I got most of the things working as people expected. (well after convincing everyone that gif's were not business critical feature )

But this here is a deal breaker. Given everyone has at least phone and laptop, where they want to access such messages, constant notifications drives everyone insane. And I haven't even integrated ticketing system into matrix jet.

Will have to put migration on hold until this is fixed, or better client for matrix comes along.

@Cyberes
Copy link

Cyberes commented May 8, 2023

@marinkol Sounds like they could have possibly lost your business. You should send them a message to the commercial part of Element to let them know how big a deal this is: https://try.element.io/contact-sales

@rwjack
Copy link

rwjack commented May 9, 2023

Someone very based just added $500 to the bounty.

https://app.bountysource.com/issues/28824980-don-t-send-push-notifications-to-users-who-are-clearly-active-on-a-device

image

@pszypowicz
Copy link

pszypowicz commented May 9, 2023

It looks like there is related issue too: #1096

edit: this is the only issue (which I keep as "subscribed") I care about in matrix. I dropped my conversation from it and moved to whats up (which I hate for multiple reason - but they at least handle essentials right: notification system). I can't recommend matrix/element any more, unless that gets solved.

@K4LCIFER
Copy link

K4LCIFER commented Aug 1, 2023

I'm not sure why this has the "Minor" severity tag. The issue of not detecting that another app is in use makes notifications borderline unuseable to the point where I have to keep them permanently turned off -- I can't stand the constant notification alerts on my phone when I'm talking through the desktop app.

@K4LCIFER
Copy link

K4LCIFER commented Aug 1, 2023

@rwjack
Someone very based just added $500 to the bounty.

https://app.bountysource.com/issues/28824980-don-t-send-push-notifications-to-users-who-are-clearly-active-on-a-device

image

That's rather unfortunate. As you can see in the current list of issues for BountySource, they have broken all trust with the community, and are being accused of stealing everyone's funds, as shown below:
image

@FlitPix
Copy link

FlitPix commented Sep 14, 2023

I agree that this should be prioritized more - why is this in S-Minor? Marking things as read whenever I move to Element Android is very annoying.

@Cyberes
Copy link

Cyberes commented Sep 18, 2023

My understanding is that this is linked to the whole presence issue. I assume that that has to be solved before they can touch this notification issue. Both should be marked as critical importance.

@GGORG0
Copy link

GGORG0 commented Feb 24, 2024

Hi, are there any updates on this? Has there been any work done?
It's an 8 year old issue at this point and I'm surprised such a "simple" (idk how simple it actually is) thing hasn't been done yet...

@jan-Sanku
Copy link

This should be S-Critical at this point! I can only speak for myself, but I'd consider this essential for a messaging application. Element is great, otherwise, but over 8.5 years for this is pretty damn bad!

And surely it can't be that hard; Discord, Steam, and pretty much everything else already handle this behavior just fine.

A simple method of detecting whether a user is active on a device is to check for mouse and/or keyboard input globally. You can try this with the aforementioned Steam and Discord: Have your status set to "Online", don't touch your computer for 10 minutes, now your status will be "Idle". Touch your mouse and they both jump back to online. (Discord has a separate (adjustable!) timer for how long it should hold notifications, but that's beside the point)

If all web/desktop clients have not detected any input for n minutes, start sending notifications to mobile devices. If any web/desktop client is active, do not. Simple as that.

@t3chguy
Copy link
Member

t3chguy commented Aug 28, 2024

If all web/desktop clients have not detected any input for n minutes, start sending notifications to mobile devices. If any web/desktop client is active, do not. Simple as that.

The sending of notifications to mobile devices is done by the Matrix server and nothing in the Matrix spec says to behave as you describe, so this is going to be something which someone needs to write an MSC for and then tweak the behaviour in whichever Matrix server implementation you are using.

@rwjack
Copy link

rwjack commented Aug 28, 2024

For anyone brave enough to write that MSC, here's some food for thought:

Since this is a "presence" thing, what happens if servers have presence disabled?

For the changes that will fix this issue to work, presence should be "server based", which could control the logic of the push notification delivery system, and if servers decide to disable presence, that shouldn't break the push notifications, it's just that the presence status won't be delivered to end clients.

Then again, with "server based" - all the time presence, we're running into some potential privacy issues, such as easier admin snooping of who is online, even if "end user presence" is technically disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Notifications O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Minor Impairs non-critical functionality or suitable workarounds exist T-Enhancement
Projects
None yet
Development

No branches or pull requests