aboutsummaryrefslogtreecommitdiff
path: root/matrix
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 /matrix
parent0a493d643c3a15779dcee35583f8e5c59fde3031 (diff)
Add toggles for disabling markdown and HTML
Diffstat (limited to 'matrix')
-rw-r--r--matrix/matrix.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/matrix/matrix.go b/matrix/matrix.go
index 226df6c..e7fbcc3 100644
--- a/matrix/matrix.go
+++ b/matrix/matrix.go
@@ -392,7 +392,7 @@ func (c *Container) HandlePreferences(source EventSource, evt *mautrix.Event) {
func (c *Container) SendPreferencesToMatrix() {
defer debug.Recover()
debug.Print("Sending updated preferences:", c.config.Preferences)
- u := c.client.BuildURL("user", c.config.UserID, "account_data", "net.maunium.gomuks.preferences")
+ u := c.client.BuildURL("user", c.config.UserID, "account_data", AccountDataGomuksPreferences.Type)
_, err := c.client.MakeRequest("PUT", u, &c.config.Preferences, nil)
if err != nil {
debug.Print("Failed to update preferences:", err)
@@ -739,7 +739,7 @@ func (c *Container) PrepareMarkdownMessage(roomID string, msgtype mautrix.Messag
MsgType: msgtype,
}
} else {
- content = format.RenderMarkdown(text)
+ content = format.RenderMarkdown(text, !c.config.Preferences.DisableMarkdown, !c.config.Preferences.DisableHTML)
content.MsgType = msgtype
}