aboutsummaryrefslogtreecommitdiff
path: root/ui/commands.go
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2020-04-08 15:30:29 +0300
committerTulir Asokan <tulir@maunium.net>2020-04-08 15:30:29 +0300
commita6f6fb3ef22658508671296a31367a198205da99 (patch)
tree448766b706b0dab25e6541fd1d9cb5e2a7439c51 /ui/commands.go
parent80564b2887085a088a4f753042dbe345092e45a1 (diff)
Display thumbnail for all files and add commands to download and open files
Diffstat (limited to 'ui/commands.go')
-rw-r--r--ui/commands.go16
1 files changed, 13 insertions, 3 deletions
diff --git a/ui/commands.go b/ui/commands.go
index a57a78d..a74a164 100644
--- a/ui/commands.go
+++ b/ui/commands.go
@@ -150,9 +150,11 @@ func cmdID(cmd *Command) {
type SelectReason string
const (
- SelectReply SelectReason = "reply to"
- SelectReact = "react to"
- SelectRedact = "redact"
+ SelectReply SelectReason = "reply to"
+ SelectReact = "react to"
+ SelectRedact = "redact"
+ SelectDownload = "download"
+ SelectOpen = "open"
)
func cmdReply(cmd *Command) {
@@ -163,6 +165,14 @@ func cmdRedact(cmd *Command) {
cmd.Room.StartSelecting(SelectRedact, strings.Join(cmd.Args, " "))
}
+func cmdDownload(cmd *Command) {
+ cmd.Room.StartSelecting(SelectDownload, strings.Join(cmd.Args, " "))
+}
+
+func cmdOpen(cmd *Command) {
+ cmd.Room.StartSelecting(SelectOpen, strings.Join(cmd.Args, " "))
+}
+
func cmdReact(cmd *Command) {
if len(cmd.Args) == 0 {
cmd.Reply("Usage: /react <reaction>")