mirror of
https://github.com/42wim/matterbridge.git
synced 2025-01-18 13:09:03 -08:00
Explicitly announce the sender of each file in Telegram, simplifying moderation
This commit is contained in:
parent
c4157a4d5b
commit
8a2f7dcad4
@ -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)
|
// check if we have files to upload (from slack, telegram or mattermost)
|
||||||
if len(msg.Extra["file"]) > 0 {
|
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)
|
return b.handleUploadFile(&msg, chatid, topicid, parentID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1088,6 +1088,10 @@ ShowTopicChange=false
|
|||||||
#OPTIONAL (default false)
|
#OPTIONAL (default false)
|
||||||
PreserveThreading=false
|
PreserveThreading=false
|
||||||
|
|
||||||
|
#Send an extra message indicating the sender for files.
|
||||||
|
#OPTIONAL (default false)
|
||||||
|
AnnounceFileSender=false
|
||||||
|
|
||||||
###################################################################
|
###################################################################
|
||||||
#rocketchat section
|
#rocketchat section
|
||||||
###################################################################
|
###################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user