connector/client: init scoped store earlier
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
@@ -126,6 +126,8 @@ func NewTelegramClient(ctx context.Context, tc *TelegramConnector, login *bridge
|
||||
zaplog := zap.New(zerozap.New(log))
|
||||
|
||||
client := TelegramClient{
|
||||
ScopedStore: tc.Store.GetScopedStore(telegramUserID),
|
||||
|
||||
main: tc,
|
||||
telegramUserID: telegramUserID,
|
||||
loginID: login.ID,
|
||||
@@ -204,8 +206,6 @@ func NewTelegramClient(ctx context.Context, tc *TelegramConnector, login *bridge
|
||||
dispatcher.OnChat(client.onChat)
|
||||
dispatcher.OnPhoneCall(client.onPhoneCall)
|
||||
|
||||
client.ScopedStore = tc.Store.GetScopedStore(telegramUserID)
|
||||
|
||||
client.updatesManager = updates.New(updates.Config{
|
||||
OnChannelTooLong: func(channelID int64) {
|
||||
tc.Bridge.QueueRemoteEvent(login, &simplevent.ChatResync{
|
||||
|
||||
Reference in New Issue
Block a user