From 93dcce7fe4c9c08b200507312cc5812e51f7a9cf Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Tue, 27 Sep 2016 21:33:29 -0400 Subject: [PATCH] add support for emote and topic setting --- src/matrix.coffee | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/matrix.coffee b/src/matrix.coffee index 7157e5b..a1a4de4 100644 --- a/src/matrix.coffee +++ b/src/matrix.coffee @@ -23,10 +23,23 @@ class Matrix extends Adapter body: str } + emote: (envelope, strings...) -> + for str in strings + @client.sendMessage envelope.room, { + msgtype: "m.emote", + body: str + } + reply: (envelope, strings...) -> for str in strings @send envelope, "#{envelope.user.name}: #{str}" + topic: (envelope, strings...) -> + for str in strings + @sendEvent envelope.room, "m.room.topic", { + topic: str + } + sendImage: (envelope, url) -> @client.uploadContent(stream: request url, name: url).done (murl) => @client.sendMessage envelope.room, {