store: save updates state in database

Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
Sumner Evans
2024-06-06 16:59:53 -06:00
parent a4aedec044
commit 323fe1603e
6 changed files with 232 additions and 53 deletions
+1 -1
View File
@@ -175,7 +175,7 @@ func (p *PhoneLogin) SubmitUserInput(ctx context.Context, input map[string]strin
func (p *PhoneLogin) handleAuthSuccess(ctx context.Context, authorization *tg.AuthAuthorization) (*bridgev2.LoginStep, error) {
// Now that we have the Telegram user ID, store it in the database and
// close the login client.
sessionStore := p.main.store.GetSessionStore(authorization.User.GetID())
sessionStore := p.main.store.GetScopedStore(authorization.User.GetID())
var sessionData []byte
sessionData, err := p.storage.Bytes(sessionData)
if err != nil {