aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2020-04-04 01:03:17 +0300
committerTulir Asokan <tulir@maunium.net>2020-04-04 01:03:17 +0300
commit842aab13243b0c14f20ae8a3a1d8501a33920501 (patch)
treeab624cbbd5c57ec80e4d933edce51be02b85d89e /ui
parent0a493d643c3a15779dcee35583f8e5c59fde3031 (diff)
Add toggles for disabling markdown and HTML
Diffstat (limited to 'ui')
-rw-r--r--ui/commands.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/ui/commands.go b/ui/commands.go
index 8cfe55d..747be1e 100644
--- a/ui/commands.go
+++ b/ui/commands.go
@@ -556,6 +556,20 @@ func cmdToggle(cmd *Command) {
cmd.Config.Preferences.DisableTypingNotifs = !cmd.Config.Preferences.DisableTypingNotifs
case "emojis":
cmd.Config.Preferences.DisableEmojis = !cmd.Config.Preferences.DisableEmojis
+ case "html":
+ cmd.Config.Preferences.DisableHTML = !cmd.Config.Preferences.DisableHTML
+ if cmd.Config.Preferences.DisableHTML {
+ cmd.Reply("Disabled HTML input")
+ } else {
+ cmd.Reply("Enabled HTML input")
+ }
+ case "markdown":
+ cmd.Config.Preferences.DisableMarkdown = !cmd.Config.Preferences.DisableMarkdown
+ if cmd.Config.Preferences.DisableMarkdown {
+ cmd.Reply("Disabled Markdown input")
+ } else {
+ cmd.Reply("Enabled Markdown input")
+ }
default:
cmd.Reply("Usage: /toggle <rooms/users/baremessages/images/typingnotif/emojis>")
return