commit 785a122508c569114ccfb70d61c8540c28715b35
Author: rani <clagv.randomgames@gmail.com>
Date: Mon Mar 16 14:47:13 2026 +0000
diff --git a/scripts/outmessage.tengo b/scripts/outmessage.tengo
index 9a740f4..8bea57d 100644
--- a/scripts/outmessage.tengo
+++ b/scripts/outmessage.tengo
@@ -217 +219 @@ doQuote_ := func(reply, nick, ctx) {
- } else if outProtocol == "irc" || outProtocol == "telegram" {
+ } else if outProtocol == "irc" ||
+ outProtocol == "telegram" ||
+ outProtocol == "matrix" {
@@ -296 +3115 @@ doQuote_ := func(reply, nick, ctx) {
}
+stripQuote := func(ctx) {
+ // > ↪ NICK
+ // > ...
+ // > ...
+ // ctx
+ re := text.re_compile(`(?m)^> (?:-# )?↪ .+\n(?:> .*\n)+(.*)`)
+ return re.replace(ctx, "$1")
+}
+
// match $1 must be the reply
// match $2 must be the nick
// match $3 must be the context
@@ -369 +4710 @@ doQuote := func(...reStrs) {
- reply := re.replace(msgText, "$1")
- nick := re.replace(msgText, "$2")
- ctx := re.replace(msgText, "$3")
+ reply := re.replace(msgText, "$1")
+ nick := re.replace(msgText, "$2")
+ ctx := re.replace(msgText, "$3")
+ ctx = stripQuote(ctx)