add support for emote and topic setting
This commit is contained in:
parent
e0acdabe53
commit
93dcce7fe4
@ -23,10 +23,23 @@ class Matrix extends Adapter
|
|||||||
body: str
|
body: str
|
||||||
}
|
}
|
||||||
|
|
||||||
|
emote: (envelope, strings...) ->
|
||||||
|
for str in strings
|
||||||
|
@client.sendMessage envelope.room, {
|
||||||
|
msgtype: "m.emote",
|
||||||
|
body: str
|
||||||
|
}
|
||||||
|
|
||||||
reply: (envelope, strings...) ->
|
reply: (envelope, strings...) ->
|
||||||
for str in strings
|
for str in strings
|
||||||
@send envelope, "#{envelope.user.name}: #{str}"
|
@send envelope, "#{envelope.user.name}: #{str}"
|
||||||
|
|
||||||
|
topic: (envelope, strings...) ->
|
||||||
|
for str in strings
|
||||||
|
@sendEvent envelope.room, "m.room.topic", {
|
||||||
|
topic: str
|
||||||
|
}
|
||||||
|
|
||||||
sendImage: (envelope, url) ->
|
sendImage: (envelope, url) ->
|
||||||
@client.uploadContent(stream: request url, name: url).done (murl) =>
|
@client.uploadContent(stream: request url, name: url).done (murl) =>
|
||||||
@client.sendMessage envelope.room, {
|
@client.sendMessage envelope.room, {
|
||||||
|
Loading…
Reference in New Issue
Block a user