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

Missing reaction events #174

Closed
Avi0n opened this issue Jul 9, 2020 · 8 comments · Fixed by #252 or #351
Closed

Missing reaction events #174

Avi0n opened this issue Jul 9, 2020 · 8 comments · Fixed by #252 or #351

Comments

@Avi0n
Copy link

Avi0n commented Jul 9, 2020

Is it possible for nio to support m.reaction events? It would be nice to be able to have the bot react to messages as well as detect when users react to messages.

@poljar
Copy link
Collaborator

poljar commented Jul 10, 2020

While reaction events aren't yet parsed and turned into a nice Python class, they can be accessed as an UnknownEvent.

@BurnyBoi
Copy link

@poljar Is this still the case? Was wondering if Mirage can add reactions in currently.

@poljar
Copy link
Collaborator

poljar commented Nov 26, 2020

It is, I'm still stuck in crypto rewrite limbo.

@ryexandrite
Copy link

For reference, sending a reaction is relatively easy even without explicit support

async def send_reaction_to_room(
    client: AsyncClient,
    room_id: str,
    message: str,
    event: RoomMessage,
):
    content = {
        "m.relates_to": {
            "rel_type": "m.annotation",
            "event_id": event.event_id,
            "key": message,
        }
    }

    await client.room_send(
        room_id,
        "m.reaction",
        content,
        ignore_unverified_devices=True,
    )
    
  #--------------------
  
  # ...
  await send_reaction_to_room(client, room_id, "👀", event)

@samyak-jain
Copy link
Contributor

@poljar Do you mind if this is something I take up?

@poljar
Copy link
Collaborator

poljar commented Apr 4, 2021

No, I don't mind at all. Contributions as always are welcome.

@samyak-jain
Copy link
Contributor

Thanks @poljar. I've made the PR #252. Let me know what you think when you get the time to check it out.

@poljar poljar reopened this Apr 18, 2021
@poljar
Copy link
Collaborator

poljar commented Apr 18, 2021

Reopening since #252 is about stickers and not about m.reaction events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants