Checking Text Content

MaxwellNelson

New member
I am trying to run a macro that blocks notifications from reactions from iphone users in the messager app. I tried using the guide below but it isn't working. The trigger works but the action does not. I believe the issue is in the "Clear Notifications" justifier. I tried using

Text Content:
Contains
Liked "

I tried using the options on the right to call to a specific body of text but not sure I had the proper syntax
Any Ideas?


https://swiftheadline.com/how-to-block-annoying-imessage-reactions-on-android/
 

Attachments

  • Screenshot_20220112-140640.png
    Screenshot_20220112-140640.png
    133.1 KB · Views: 25

dsnz

Well-known member
even though I have no idea what exactly is the content of these messages, I think you should remove the " at the end of the Contains string
it seems to me to not be a real part of the message and an error
 

MaxwellNelson

New member
Trying to not receive notifications from iphone users when they react to a message. The quotation is intended to hide only reactionary texts and not any text that says liked.
 

Attachments

  • Screenshot_20220112-163222.png
    Screenshot_20220112-163222.png
    334.6 KB · Views: 10

RSF

Well-known member
I think it could be that the Messages app's message contains a fancier quotation mark:
Liked “msg text​
instead of
Liked "msg text...​
It's hard to see, but the first is character code 8220 whereas a typical quotation mark is character code 34.

So: try doing a copy and paste of the character from the Messages app, or use the regular expression option with
Liked \p{Pi}​
to match. (\p{Pi} means "any opening quotation mark".

You could even put all the iMessage replies shown in your link, in a single regular expression:
(Liked|Disliked|Laughed at|Emphasized|Questioned)\s\p{Pi}
 

Dm114

Well-known member
I think it could be that the Messages app's message contains a fancier quotation mark:
Liked “msg text​
instead of
Liked "msg text...​
It's hard to see, but the first is character code 8220 whereas a typical quotation mark is character code 34.

So: try doing a copy and paste of the character from the Messages app, or use the regular expression option with
Liked \p{Pi}​
to match. (\p{Pi} means "any opening quotation mark".

You could even put all the iMessage replies shown in your link, in a single regular expression:
(Liked|Disliked|Laughed at|Emphasized|Questioned)\s\p{Pi}
Good suggestions, mainly the copy/paste one. 👍
 

RSF

Well-known member
Note that the Messages app is rolling out a new version that handles this for you. (See this article in TechCrunch, among others). You may want to ensure you're on the new version of Messages, before implementing a macro in MacroDroid.

But if you're using a different messaging app, and still want to clear notifications from iPhone users, this worked for me ...
  • Trigger: Notification received, from Messages app
  • Action: Notification Interaction, Action #1 (i.e., tap "Mark as Read")
    • Constraint: test (with Regex option) the notification text for
      (Liked|Disliked|Laughed at|Emphasized|Questioned)\s\p{Pi}
Note that the notification sound still played for such messages, since Android was still receiving and displaying their notifications. The macro simply made the notification disappear automatically. If you don't want the notification sound either, you'd have to disable the sound in Android's settings, and add an Action to the macro to play a sound if the text didn't match the "Liked|Disliked..." text
 
Top