mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-22 16:20:26 +00:00
parent
c9cfa59f54
commit
d44598a900
@ -84,6 +84,7 @@ type Protocol struct {
|
|||||||
DisableWebPagePreview bool // telegram
|
DisableWebPagePreview bool // telegram
|
||||||
EditSuffix string // mattermost, slack, discord, telegram, gitter
|
EditSuffix string // mattermost, slack, discord, telegram, gitter
|
||||||
EditDisable bool // mattermost, slack, discord, telegram, gitter
|
EditDisable bool // mattermost, slack, discord, telegram, gitter
|
||||||
|
HTMLDisable bool // matrix
|
||||||
IconURL string // mattermost, slack
|
IconURL string // mattermost, slack
|
||||||
IgnoreFailureOnStart bool // general
|
IgnoreFailureOnStart bool // general
|
||||||
IgnoreNicks string // all protocols
|
IgnoreNicks string // all protocols
|
||||||
|
@ -124,6 +124,14 @@ func (b *Bmatrix) Send(msg config.Message) (string, error) {
|
|||||||
return resp.EventID, err
|
return resp.EventID, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if b.GetBool("HTMLDisable") {
|
||||||
|
resp, err := b.mc.SendText(channel, msg.Username+msg.Text)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
return resp.EventID, err
|
||||||
|
}
|
||||||
|
|
||||||
username := html.EscapeString(msg.Username)
|
username := html.EscapeString(msg.Username)
|
||||||
// check if we have a </tag>. if we have, we don't escape HTML. #696
|
// check if we have a </tag>. if we have, we don't escape HTML. #696
|
||||||
if b.htmlTag.MatchString(msg.Username) {
|
if b.htmlTag.MatchString(msg.Username) {
|
||||||
|
@ -1209,6 +1209,11 @@ Password="yourpass"
|
|||||||
#OPTIONAL (default false)
|
#OPTIONAL (default false)
|
||||||
NoHomeServerSuffix=false
|
NoHomeServerSuffix=false
|
||||||
|
|
||||||
|
#Whether to disable sending of HTML content to matrix
|
||||||
|
#See https://github.com/42wim/matterbridge/issues/1022
|
||||||
|
#OPTIONAL (default false)
|
||||||
|
HTMLDisable=false
|
||||||
|
|
||||||
## RELOADABLE SETTINGS
|
## RELOADABLE SETTINGS
|
||||||
## Settings below can be reloaded by editing the file
|
## Settings below can be reloaded by editing the file
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user