Archived
1

Squads and chats in DataCache, squads rework

Work in progress, bugs may vary
This commit is contained in:
2018-02-17 07:03:58 +04:00
parent 7af54a1b02
commit fef521e35b
25 changed files with 645 additions and 710 deletions

View File

@@ -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"
}