- Fixed: Reactions weren't working because sendCompleteEvent is a private method.

This commit is contained in:
Skylar Sadlier 2022-02-03 09:40:32 -07:00
parent f3df8c6f97
commit 9f0a962991

View File

@ -53,18 +53,16 @@ module.exports = function(RED) {
msg.type = 'm.reaction'; msg.type = 'm.reaction';
node.server.matrixClient.sendCompleteEvent( node.server.matrixClient.sendEvent(
msg.topic, msg.topic,
'm.reaction',
{ {
type: 'm.reaction',
content: {
"m.relates_to": { "m.relates_to": {
event_id: eventId, event_id: eventId,
key: msg.payload, key: msg.payload,
rel_type: "m.annotation" rel_type: "m.annotation"
} }
} }
}
) )
.then(function(e) { .then(function(e) {
msg.eventId = e.event_id; msg.eventId = e.event_id;