🐛 Fix bug to message if bot or telegram left channel
This commit is contained in:
parent
a0494b72b1
commit
1330cb67bc
@ -78,12 +78,16 @@ func checkGroupUser(group *models.Group, groupHelperService logic.GroupHelperSer
|
||||
if !member.HasLeft() {
|
||||
continue
|
||||
}
|
||||
|
||||
if !(member.User.IsBot || member.User.FirstName == "Telegram") {
|
||||
leaveMessage := group.UserLeaveMessage
|
||||
leaveMessage = message.ReplaceMessage(leaveMessage, member.User)
|
||||
|
||||
msg := tgbotapi.NewMessage(group.GroupID, leaveMessage)
|
||||
msg.ParseMode = "Markdown"
|
||||
bot.Send(msg)
|
||||
}
|
||||
|
||||
_, err = groupHelperService.UserLeaveGroup(user, group)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
|
@ -30,7 +30,7 @@ func (i infoCommand) ExecuteCommand(bot *tgbotapi.BotAPI, update *tgbotapi.Updat
|
||||
"General Information to this Bot\n" +
|
||||
"===============================\n" +
|
||||
"Developer: @Alphyron\n" +
|
||||
"Version: 2.2.5\n" +
|
||||
"Version: 2.2.6\n" +
|
||||
"Git: [Gitea Repository](https://git.dragon-labs.de/alphyron/group_assistant)\n" +
|
||||
"==============================="
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user