summaryrefslogtreecommitdiffstats
path: root/bridge
diff options
context:
space:
mode:
Diffstat (limited to 'bridge')
-rw-r--r--bridge/discord/discord.go2
-rw-r--r--bridge/matrix/matrix.go15
-rw-r--r--bridge/mattermost/helpers.go1
3 files changed, 10 insertions, 8 deletions
diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go
index cd3db76d..ad08cd30 100644
--- a/bridge/discord/discord.go
+++ b/bridge/discord/discord.go
@@ -272,8 +272,6 @@ func (b *Bdiscord) Send(msg config.Message) (string, error) {
// Handle prefix hint for unthreaded messages.
if msg.ParentNotFound() {
msg.ParentID = ""
- msg.Text = strings.TrimPrefix(msg.Text, "\n")
- msg.Text = fmt.Sprintf("> %s %s", msg.Username, msg.Text)
}
// Use webhook to send the message
diff --git a/bridge/matrix/matrix.go b/bridge/matrix/matrix.go
index a2525358..702f4c8d 100644
--- a/bridge/matrix/matrix.go
+++ b/bridge/matrix/matrix.go
@@ -428,12 +428,15 @@ func (b *Bmatrix) handleReply(ev *matrix.Event, rmsg config.Message) bool {
}
body := rmsg.Text
- for strings.HasPrefix(body, "> ") {
- lineIdx := strings.IndexRune(body, '\n')
- if lineIdx == -1 {
- body = ""
- } else {
- body = body[(lineIdx + 1):]
+
+ if !b.GetBool("keepquotedreply") {
+ for strings.HasPrefix(body, "> ") {
+ lineIdx := strings.IndexRune(body, '\n')
+ if lineIdx == -1 {
+ body = ""
+ } else {
+ body = body[(lineIdx + 1):]
+ }
}
}
diff --git a/bridge/mattermost/helpers.go b/bridge/mattermost/helpers.go
index 23700a0c..c69d94fb 100644
--- a/bridge/mattermost/helpers.go
+++ b/bridge/mattermost/helpers.go
@@ -183,6 +183,7 @@ func (b *Bmattermost) sendWebhook(msg config.Message) (string, error) {
if b.GetBool("PrefixMessagesWithNick") {
msg.Text = msg.Username + msg.Text
}
+
if msg.Extra != nil {
// this sends a message only if we received a config.EVENT_FILE_FAILURE_SIZE
for _, rmsg := range helper.HandleExtra(&msg, b.General) {