Ban politic lifted for a while
This commit is contained in:
parent
184055e2f8
commit
4d7f545c92
@ -211,6 +211,9 @@ func (s *Squader) getCommandersForSquadViaChat(chatRaw *dbmapping.Chat) ([]dbmap
|
||||
}
|
||||
|
||||
func (s *Squader) kickUserFromSquadChat(user *tgbotapi.User, chatRaw *dbmapping.Chat) {
|
||||
bastionChatID, _ := strconv.ParseInt(c.Cfg.SpecialChats.BastionID, 10, 64)
|
||||
hqChatID, _ := strconv.ParseInt(c.Cfg.SpecialChats.HeadquartersID, 10, 64)
|
||||
if chatRaw.TelegramID == bastionChatID {
|
||||
chatUserConfig := tgbotapi.ChatMemberConfig{
|
||||
ChatID: chatRaw.TelegramID,
|
||||
UserID: user.ID,
|
||||
@ -230,6 +233,7 @@ func (s *Squader) kickUserFromSquadChat(user *tgbotapi.User, chatRaw *dbmapping.
|
||||
if err != nil {
|
||||
c.Log.Error(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
suerName := ""
|
||||
if user.UserName != "" {
|
||||
@ -240,9 +244,6 @@ func (s *Squader) kickUserFromSquadChat(user *tgbotapi.User, chatRaw *dbmapping.
|
||||
suerName += " " + user.LastName
|
||||
}
|
||||
}
|
||||
|
||||
bastionChatID, _ := strconv.ParseInt(c.Cfg.SpecialChats.BastionID, 10, 64)
|
||||
hqChatID, _ := strconv.ParseInt(c.Cfg.SpecialChats.HeadquartersID, 10, 64)
|
||||
if chatRaw.TelegramID != bastionChatID {
|
||||
// In Bastion notifications are public in default chat
|
||||
commanders, ok := s.getCommandersForSquadViaChat(chatRaw)
|
||||
|
Reference in New Issue
Block a user