dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit 2fb2d184083bdc4b3219b22b183b7b705541d0ab
parent c3717635c49c50a7d6cb036d91db03e86ef752f0
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Wed, 28 Jun 2023 13:17:53 -0700

fix auth

Diffstat:
Mpkg/database/utils/processMessage.go | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkg/database/utils/processMessage.go b/pkg/database/utils/processMessage.go @@ -109,7 +109,7 @@ func ProcessRawMessage(db *database.DkfDB, in, roomKey string, authUserID databa html = convertPGPPublicKeyToFile(db, html, authUserID) html = convertAgeMessageToFile(db, html, authUserID) html = convertLinksWithoutScheme(html) - html = convertMarkdown(html, manualML) + html = convertMarkdown(html, canUseMultiline, manualML) html = convertBangShortcuts(html) html = convertArchiveLinks(db, html, roomID, authUserID) html = convertLinks(html, roomID, db.GetUserByUsername, db.GetLinkByShorthand, db.GetChatMessageByUUID) @@ -840,11 +840,11 @@ func convertBangShortcuts(html string) string { return r.Replace(html) } -func convertMarkdown(in string, manualML bool) string { +func convertMarkdown(in string, canUseMultiline, manualML bool) string { out := strings.Replace(in, "\r", "", -1) flags := bf.NoIntraEmphasis | bf.Tables | bf.FencedCode | bf.Strikethrough | bf.SpaceHeadings | bf.DefinitionLists | bf.HardLineBreak | bf.NoLink - if manualML { + if canUseMultiline && manualML { flags |= bf.ManualLineBreak } resBytes := bf.Run([]byte(out), bf.WithRenderer(utils.MyRenderer(false, false)), bf.WithExtensions(flags))