Squads and chats in DataCache, squads rework
Work in progress, bugs may vary
This commit is contained in:
@@ -10,8 +10,9 @@ import (
|
||||
|
||||
func (w *Welcomer) alertUserWithoutProfile(update *tgbotapi.Update, newUser *tgbotapi.User) string {
|
||||
alertGroupID, _ := strconv.ParseInt(c.Cfg.SpecialChats.HeadquartersID, 10, 64)
|
||||
chat, ok := c.Chatter.GetOrCreateChat(update)
|
||||
if !ok {
|
||||
chat, err := c.DataCache.GetOrCreateChat(update)
|
||||
if err != nil {
|
||||
c.Log.Error(err.Error())
|
||||
return "fail"
|
||||
}
|
||||
|
||||
@@ -39,8 +40,9 @@ 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.SpecialChats.HeadquartersID, 10, 64)
|
||||
chat, ok := c.Chatter.GetOrCreateChat(update)
|
||||
if !ok {
|
||||
chat, err := c.DataCache.GetOrCreateChat(update)
|
||||
if err != nil {
|
||||
c.Log.Error(err.Error())
|
||||
return "fail"
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user