Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support EditDisable and EditSuffix for Matrix. #2207

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions bridge/matrix/matrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,13 @@ func (b *Bmatrix) handleEdit(ev *matrix.Event, rmsg config.Message) bool {
return false
}

if b.GetBool("EditDisable") {
return true
}

rmsg.ID = relation.EventID
rmsg.Text = newContent.Body
rmsg.Text += b.GetString("EditSuffix")
b.Remote <- rmsg

return true
Expand Down
8 changes: 8 additions & 0 deletions matterbridge.toml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -1268,6 +1268,14 @@ UseUserName=false
# - https://github.com/42wim/matterbridge/issues/1780
KeepQuotedReply=false

#Disable sending of edits to other bridges
#OPTIONAL (default false)
EditDisable=false

#Message to be appended to every edited message
#OPTIONAL (default empty)
EditSuffix=" (edited)"

#Nicks you want to ignore.
#Regular expressions supported
#Messages from those users will not be sent to other bridges.
Expand Down