tinode / chat

Instant messaging platform. Backend in Go. Clients: Swift iOS, Java Android, JS webapp, scriptable command line; chatbots
GNU General Public License v3.0
12.06k stars 1.88k forks source link

Reactions to messages #693

Open gabriel-vasile opened 3 years ago

gabriel-vasile commented 3 years ago

In frontends each message will have a "Add reaction" button which will open a pop-up with thumbs ups, thumbs downs, and other smiley faces and reactions. Users can choose a reaction which will be added to the list of reactions for that message. Is this a feature you're willing to have in tinode, @or-else?

or-else commented 3 years ago

Is this the same/related to https://github.com/tinode/chat/issues/672?

or-else commented 3 years ago

Also this https://github.com/tinode/webapp/issues/49 and this https://github.com/tinode/webapp/issues/30

or-else commented 3 years ago

Is it for channels?

gabriel-vasile commented 3 years ago

No, it's not related to any of the 3 issues. Those ask for the messages to contain emojis, stickers, etc. This is about adding reactions to already sent messages. Similar to what github, slack, messenger have.

Is it for channels?

I was thinking only users with write permission to topic to be able to add reactions. So it would work on channels for subscribers, but readers would not be allowed to send reactions, they would just see them.

rkgarcia commented 3 years ago

What's the purpose with this? I can't see that options in products like whatsapp and telegram

or-else commented 3 years ago

We have discussed a similar feature internally. I created an issue for it for reference: https://github.com/tinode/chat/issues/696

Your feature is effectively a different UI for the polling. The reactions feature can be seen as an always-present poll with predefined options.

It's not a simple feature though. The main complexity is how to store the votes (reactions) on the backend and how to report them back. We wanted to use {note} with what=data and a json payload to collect votes, use {info} to update stats while the user is attached to topic. But then we need to be able to enforce voting rules on the backend, aggregate statistics. It's not clear if the votes should be stored in a separate table/collection or in the messages table. Both have drawbacks.

or-else commented 3 years ago

What's the purpose with this? I can't see that options in products like whatsapp and telegram

It's a useful feature for channels. FB/IG messenger has it. Telegram has a similar but heavier feature: channels can be enabled to have a conversation for each message.

gabriel-vasile commented 3 years ago

Your feature is effectively a different UI for the polling. The reactions feature can be seen as an always-present poll with predefined options.

No. Polls are linked to a conversation, reactions are linked to a message.

696 This feature should work in normals groups and in channels.

No. Reactions should work in any conversation: p2p, group, channel.

Again, what I said in the original post is:

EACH message will have a "Add reaction" button Users can choose a reaction which will be added to the list of reactions for THAT MESSAGE

Examples: Reactions in skype: reactions skype Reactions in slack: reactions slack1 reactions slack2

or-else commented 3 years ago

No. No.

In such a case I have further input to share with you.

vladdnepr commented 2 years ago

Hi. Do you have any updates about this feature? Can I help with this one?

or-else commented 2 years ago

Can I help with this one?

Sure but it's a complex feature. Particularly on the backed: how to store reactions, how to query for them, send updates. Your other feature request Pin chat, #751 is much simpler and maybe a better start if you wish to contribute.