From 842aab13243b0c14f20ae8a3a1d8501a33920501 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sat, 4 Apr 2020 01:03:17 +0300 Subject: Add toggles for disabling markdown and HTML --- ui/commands.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'ui') 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 ") return -- cgit v1.2.3