Archived
1

Three special chats in config

This commit is contained in:
2017-11-26 16:54:06 +04:00
parent a0bfc6b32f
commit ca147a99a3
5 changed files with 22 additions and 14 deletions

View File

@@ -9,7 +9,7 @@ import (
)
func (w *Welcomer) alertUserWithoutProfile(update *tgbotapi.Update, newUser *tgbotapi.User) string {
alertGroupID, _ := strconv.ParseInt(c.Cfg.Notifications.GroupID, 10, 64)
alertGroupID, _ := strconv.ParseInt(c.Cfg.SpecialChats.HeadquartersID, 10, 64)
chat, ok := c.Chatter.GetOrCreateChat(update)
if !ok {
return "fail"
@@ -28,7 +28,7 @@ func (w *Welcomer) alertUserWithoutProfile(update *tgbotapi.Update, newUser *tgb
}
func (w *Welcomer) alertSpyUser(update *tgbotapi.Update, newUser *tgbotapi.User) string {
alertGroupID, _ := strconv.ParseInt(c.Cfg.Notifications.GroupID, 10, 64)
alertGroupID, _ := strconv.ParseInt(c.Cfg.SpecialChats.HeadquartersID, 10, 64)
chat, ok := c.Chatter.GetOrCreateChat(update)
if !ok {
return "fail"