-
Notifications
You must be signed in to change notification settings - Fork 14
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
[Story] Show that I have been mentioned in the push notification #2065
Comments
Yes, we're working on this here. |
What is the expected behaviour in how we display the user mention in the push notifications? What is the expected copy that replaces the user mention link? (This is actually something that we can do at a copy level by just detecting the permalink, however we would only be able to get the user id of the mention data coming from the SDK) Is there any additional copy too? EDIT: |
@giomfo, can you share here the trick to simulate matrix-org/matrix-spec-proposals#4028 while the HS is not yet ready, please? |
To simulate MSC4028, I plugged on an existing button the following code (in the Legacy iOS-client) to add/remove a specific Override push rule.
In parallel I used a web client to configure some rooms in the Mention&Keywords mode. |
Further to this topic coming up in the weekly BWI drop syncs I have made https://github.com/matrix-org/internal-config/issues/1469 to track the request to enable it on matrix.org. There were various discussions in rooms but hopefully this issue can be authoritative on the formal request. I asked @manuroe in the EX Leads room but it is probably better to ask here:
CC @giomfo as the MSC author. |
One further thought: if it is needed on matrix.org would it be acceptable to make it only apply to a preconfigured list of users? (this is an approach used for some other features). |
Hi @hughns The MSC4028 is in draft because it is waiting for a first implementation on the client side. I think the implementation in EX should be the minimum to take this MSC out of the draft mode, but the implementation in Legacy mobile clients and EW will be required before this MSC goes in Production. About testing, element.io may be a better candidate than matrix.org. But the idea of a preconfigured list of users seems a good plan to test on matrix.org too. |
I have made an EMS staging homeserver - @giomfo The following is what I would recommend for testing (and rollout) to support you progressing the MSC:
How does that sound? On progressing this generally I made the following notes/observations that might be helpful to you:
|
Thanks @hughns ! I am not sure we need the discoverability for this feature and add complexity to the app for a future "legacy" behavior. EX is a whole with the feature enabled in the feature. We need to make the right behavior when the app will be production ready someone in early 2023. I will double check it with @VolkerJunginger after the October release. |
@manuroe I have recently tested the EMS staging homeserver for MSC 4028 that was provided by @hughns The only problem is that the msc4028 push rule to allow pushing all the events to encrypted room while having a default value of true, is also going to not be enabled immediately since:
So we would need to first call the following API on Element X to allow for this, and we should decide when and how this should be called (if that's what we want to do), and it would be useful to have an API to check if this push rule is present or not (otherwise offering the ability to set Mentions Only in an encrypted room is pretty useless) Maybe we could call this API when we are also setting the push rule to be Mentions Only? |
@Velin92 Hi, FYI I just updated the MSC here to have the unstable push rule enabled by default as soon as the server owner decides to support this MSC. @clokep are you ok to update the synapse implementation (to enable by default the unstable push rule) in order to avoid the workaround suggested by @Velin92 client side? cc @hughns (to plan an EMS staging homeserver update) |
This would make things a lot of easier, since we would ned just a single API to check if such push rule exists and is set to true to decide to show the |
@VolkerJunginger @manuroe Because as of right now also replies to mentioning messages are considered as containing the mentions, which means that also replies to mentions will be delivered as notifications for the "Mentions only" setting. |
I'll try to untangle this:
If a user is mentioned in a reply only show that the user has been mentioned. |
@VolkerJunginger The weird thing is that for example El-Web still sends replies to a mentioned message with intentional mentions (but this could be a bug actually...) Regarding replies, no we don't have yet a custom copy or a way to detect in the notification if is a reply to the user message, we probably need a story/epic/ticket about this. |
That would definitely be a bug, the spec says that those should be filtered out.
All of this should be handled through push rules transparently (they should contain rules that any event with |
You think we can safely drop the legacy push rules for mentions rn? Since now the app supports sending intentional mentions. |
No, I don't think we should drop anything. What do you even mean by that? Disabling the rules for each user account that logs in with EX? That would disable them across all clients the user is using, AFAIK. |
Right sorry then I think I didn't understand, how would you suggest to transparently bypass the legacy rules in favour of the intentional mentions one? |
You don't have to do anything. It should already work. |
@jplatte @Velin92 About Intentional Mentions spec, see the section "Impact on replies". Don't you think El-Web follows this recommendation? |
@jplatte you are right! just tested it by sending a reply to a message that contains mentions with a new message that does not contain any from El-X to El-X and it is not seen/recognised as an highlighted event, which is in line with the acceptance criteria we defined here, then what I experienced is caused by El-Web adding the intentional mention also for the replies. @giomfo by reading the spec it says:
According to the spec El-Web seems to behave correctly however... I don't really see the point in mentioning all the users of a reply of a message that contains mentions, if the new message does not contain any, contains only a subset or a new set of mentions, also this would definitely clash with the criteria that were defined here. |
Oh, that's the recommendation from the MSC? That is exactly counter to what product ppl. have been saying. But now I remember we also discussed this in the context of Ruma, which only contains a convenience method to set mentions in a reply such that they don't re-mention people originally mentioned. I guess this that was just based on popular opinion then, because I can't find anything about this in https://spec.matrix.org/latest/client-server-api/. |
I think I mentioned this earlier in the thread, but the goal of the MSC was to not change behavior of mentions, but to make them intentional and fix all the buggy behavior around it. We can change the recommendation but it was purposefully left to follow up work so that we could get that MSC through. |
Yes, but I want to be sure we're actually on the same page about all this behavior, the planning has been too adhoc and I don't think we're all in agreement about how it should work. |
After having a chat with @VolkerJunginger since as of right now probably all the server do not support MSC 4028 and some users might not understand why the "Mentions and keywords only" option does not work at all, we should definitely have a warning shown if the server does not support MSC 4028. The idea that as soon as this screen is loaded: We check through the API I exposed here if the homeserver supports MSC 4028 and if not, an alert saying something like "be aware that your homeserver does not support the Mentions only options for ecrypted rooms which may result in the loss of all pushes if enabled" (final copy TBD) is shown. This should be shown in Advanced Settings -> Notifications -> Group or Direct, as soon as the view is loaded @amshakal @callumu can we have a chat and decide the final copy? |
@Velin92 I think the last point mentioned just above has been fixed by element-hq/element-x-ios#2081 I would like to converge about another point that you raised here. After our discussion, I agreed with you, and I updated the MSC here to have the unstable push rule enabled by default as soon as the server owner decides to support this MSC. As far as I know, the synapse implementation was not updated to take into account this spec change yet. |
@manuroe @VolkerJunginger: about the MSC4028 test plan suggested by @hughns here, we are currently at the step 1).
The most important to know is: what is the due date of this story? |
@giomfo a question came up from the Data Sync Working Group when we were discussing around this topic - the question was: how does this MSC interact with throttling that iOS/Apple (and possibly Android/Firebase) apply to push notifications that do not result in a notification being shown to the user? For iOS in Pushing background updates to your App it says: (my emphasis)
(There is also a reference to throttling at https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html#//apple_ref/doc/uid/TP40008194-CH10-SW8) A quick search hasn't found anything authoritative for Android. I note that this doesn't invalidate the MSC (which is concerned about a new type of rule irrespective of the notification channel used), but it may significantly limit it's practical use on iOS (and Android). I don't see any reference to throttling or rate limiting in the MSC itself. |
@hughns the limitation that you found in Apple documentation is only about what they name "Background Update Notifications". The number of this kind of notification is limited because it is used to make run the full application in background. By default a push notification is supposed to make run only the app extension: Notification Service Extension (NSE). I understand your concerns about the increase in the number of notifications introduced by this MSC. I don't know if there is an actual limitation on notification number at the push provider level (APNs or Firebase). But when I prepared this MSC the main potential issue raised was at the server side, see the section Push sending in the Potential issues list. Several risks have been identified and some alternatives have been suggested. Only a full-scale test can help to sort these risks and handle them. Your suggested test plan is ideal for that. |
About the first point, I synced with @Velin92. We agreed that the unstable push rule should be enabled by default. I filed element-hq/synapse#16846 for that. @VolkerJunginger @manuroe is there a due date for this story? the test plan will take time |
Story
As a user that has been mentioned I want to see this in the push so that I can react fast.
Figma link: TBD
Acceptance criteria
Size estimate
M
Dependencies
MSC
Preconditions
Open questions
Questions
Subtasks
Android
iOS
Rust
Design
The text was updated successfully, but these errors were encountered: