matrix-client-haskell icon indicating copy to clipboard operation
matrix-client-haskell copied to clipboard

Reactions

Open maralorn opened this issue 3 years ago • 1 comments
trafficstars

Hey @TristanCacqueray, thx for the library. I am working on a matrix bot for receiving information about nixpkgs commits and merges.

One thing I would like very much would be to acknowledge user requests via reactions. Have you already had a look on how to add reactions to messages?

maralorn avatar Nov 08 '22 11:11 maralorn

@maralorn you're welcome. It seems like reactions are not yet specified according to https://github.com/matrix-org/matrix-spec-proposals/pull/2677 . Best would be to look at existing room events containing reactions, and add the necessary type if needed in https://github.com/softwarefactory-project/matrix-client-haskell/blob/master/matrix-client/src/Network/Matrix/Events.hs#L20 . You might be able to test that like in https://github.com/softwarefactory-project/matrix-client-haskell/blob/master/matrix-client/test/Spec.hs#L57 .

For what its worth, here is a similar bot that forwards gerrit event, though it does not read room message: https://github.com/softwarefactory-project/gerritbot-matrix .

TristanCacqueray avatar Nov 08 '22 12:11 TristanCacqueray