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

Explicitly announce the sender of each file in Telegram, simplifying moderation #2165

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/telegram/telegram.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ func (b *Btelegram) Send(msg config.Message) (string, error) {
}
// check if we have files to upload (from slack, telegram or mattermost)
if len(msg.Extra["file"]) > 0 {
if b.GetBool("AnnounceFileSender") {
if _, msgErr := b.sendMessage(chatid, topicid, msg.Username, "", parentID); msgErr != nil {
b.Log.Errorf("sendMessage failed: %s", msgErr)
}
}
return b.handleUploadFile(&msg, chatid, topicid, parentID)
}
}
Expand Down
4 changes: 4 additions & 0 deletions matterbridge.toml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -1088,6 +1088,10 @@ ShowTopicChange=false
#OPTIONAL (default false)
PreserveThreading=false

#Send an extra message indicating the sender for files.
#OPTIONAL (default false)
AnnounceFileSender=false

###################################################################
#rocketchat section
###################################################################
Expand Down