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

✏️ [ FEAT REQ ] Emoji Reactions #152

Open
17hoehbr opened this issue Aug 23, 2024 · 11 comments
Open

✏️ [ FEAT REQ ] Emoji Reactions #152

17hoehbr opened this issue Aug 23, 2024 · 11 comments
Labels
enhancement New feature or request

Comments

@17hoehbr
Copy link

Is your feature request related to a problem? If so, please describe the problem.
I'm in a text group chat with mainly iPhone users, so whenever one of them tries to use the iMessage emoji reaction I just get a message saying "Liked "original text"", "Loved "original text"", etc.

Describe the feature you'd like
I would like it if QUIK could somehow convert those "Liked ..." messages into emoji reactions like how Google Messages does: https://techcrunch.com/2022/10/20/google-messages-adds-reaction-support-for-iphone-texts-and-in-app-reminders/

Ideally I'd also like to see QUIK add the functionality to send emoji reactions too.

@17hoehbr 17hoehbr added the enhancement New feature or request label Aug 23, 2024
@jgkawell
Copy link

I literally just opened the Issues list to post this exact same thing. I just switched off of Google Messages and would love to have this feature!

@octoshrimpy
Copy link
Owner

I've been thinking about this one, as some of my family use iOS and I get the same bothersome pings for whenever the whole group chat likes the latest photo of the newest baby or whatever. The only thing is I'm not sure if it's possible to send those emoji reactions back to iOS? I'm pretty sure it's not as easy as sending (and hiding client-side) a message with contents of "phone number liked message ID"

@jgkawell
Copy link

jgkawell commented Sep 3, 2024

I actually do think it's just sending (and hiding) those plain text messages. I say that just because Google Messages enabled the feature a while back without any change to the way iPhones were handling things. I could be wrong though.

@jgkawell
Copy link

jgkawell commented Sep 4, 2024

Okay so I did some testing on this. Turns out they are just sending text in the body of the message but they're doing some invisible special characters to get it to work. Kinda funny how much of a hack it is. Here's what I found:

If the original message was Hey, then the way to do a thumbs up is:  ​👍​ to “ Hey ” . The thing is, the quotes are the special left and right quotes (not the generic quotes normally used) and there's a bunch of invisible characters. Here's what it looks like as HTML for example:  ​👍​ to “ Hey ” 

So the rules seems to be:

  1. Start the message with a Hair Space: 200A
  2. Prefix the emoji with a Zero Width Space: 200B
  3. Insert the emoji reaction
  4. Suffix the emoji with another Zero Width Space: 200B
  5. The word "to" surrounded by regular spaces: to
  6. Start the original message with a Left Double Quotation Mark: 201C
  7. Suffix the left quotation mark with another Hair Space: 200A
  8. The original message
  9. Prefix the right quotation mark with another Hair Space: 200A
  10. End the original message with a Right Double Quotation Mark: 201D
  11. End the body with another Hair Space: 200A

My testing involved just sending a message from Quik to another phone which was running Google Messages. By sending the message from Quick with all the special characters the Google Messages app on the other phone marked it as a reaction. Pretty neat!

@jgkawell
Copy link

jgkawell commented Sep 5, 2024

@octoshrimpy Let me know if there's anything more I can do to help with this. I'm not an Android dev but I'm happy to test things out or research more if it will help.

@adamhotep
Copy link

adamhotep commented Sep 5, 2024

Apple's system is definitely different from Google's. I have been able to successfully emote responses to iPhone users manually using Quik.

Apple's implementation doesn't use hidden characters, though it does subtly use Unicode. Have an iPhone send you every single reaction and you'll easily figure it out given the formula action “text” noting that those are angled quotes ( is U+201C, left double quotation mark, and is U+201D, right double quotation mark). Make sure your test is long so you can figure out where it truncates. I'm guessing the truncation denotation uses Unicode (, U+2026, horizontal ellipsis), but that's not visually distinguishable so I don't know that for certain. There's also the question of how it handles duplicate messages as well as messages that are identical after truncation.

For example, if a friend says Thanks!, I can reply with Liked “Thanks!” or Loved “Thanks!” and it will get 👍 or ♥ accordingly. To ensure the characters are perfect, I simply copy the message text and paste it between the angled double quotes, which can be entered by long-pressing the " key on most soft keyboards, including FlorisBoard and Gboard.

Receiving reactions from either Apple or Google should therefore be trivial to render.

Sending reactions will require knowing what the recipient(s) use. Implementing this is harder but not insurmountable: take notes on reactions as they're received and use them to identify each contact's most recent version. Reuse that system or else default to whatever is the majority is logged. For group chats, go with the majority of participants. Break ties, including zeros, with Google's system since this is an Android app. (Happily disproved; sending should be easier still! See the next two comments.)

@jgkawell
Copy link

jgkawell commented Sep 5, 2024

@adamhotep Oh this is interesting! You got me wanting to try some more things out. Using your examples for iPhone I tried some more things from Quik to Google Messages and found all of these work equivalently:

  • The super complicated one from my previous comment
  • :emoji: to “<original message>”
  • Liked “<original message>”

It makes me wonder why Google Messages is sending the extra characters. Maybe so that they can determine which message comes from a Google Messages client and which comes from other clients? I don't have an iPhone so I can't try to see if these are all equivalent there. I also haven't tried an MMS group chat either. Those usually include the phone number of the sender in the message.

@adamhotep
Copy link

adamhotep commented Sep 5, 2024

Great find, @jgkawell. If Google accepts Apple syntax, then Quik can simply always send that. If that means the Apple or Google system thinks Quik is either Apple or Google, that probably doesn't matter (at least until some resulting message doesn't fail gracefully).

That actually makes sending the easier part (implement just Apple's method) while receiving must implement those three separate methods.

(Personally, the :emoji: to “original message” format is the most intuitive to me and allows an infinite number of emojis without having to implement new ones every Unicode release. Then again, there's the debate over how sane it is to allow every emoji rather than a small curated set. That makes me wonder if you can do something odd like J to “original message” and get Google to actually render the letter J as a reaction...)

@octoshrimpy
Copy link
Owner

Okay so I did some testing on this.
[...]
Pretty neat!

this is a fantastic find! I do wonder about dupe message contents and group messages. I don't have devices to test, but and working on a PoC for this right now (as well as refreshing myself on kotlin, it's been a minute)

@octoshrimpy
Copy link
Owner

@adamhotep and @jgkawell thank you both for the deeper dives! Looks like it shouldn't be too difficult to implement, apart from edge cases mentioned above. I don't have an iphone to test, but if you could test as many edge cases as you could, it will help speed up implementation!

@jgkawell
Copy link

jgkawell commented Sep 8, 2024

@octoshrimpy Awesome!! For the dupe messages I guess a sane fallback would just be to apply the reactions to the latest message that matches? That's the most likely one the reaction would apply to anyways.

I should be able to test out group messages (Quik + Google Messages). I'll see what I find and report back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants