client: add shortcut field for user login metadata

This commit is contained in:
Tulir Asokan
2025-12-07 20:01:11 +02:00
parent 6729a9ad09
commit abb4671a16
5 changed files with 24 additions and 22 deletions
+1 -1
View File
@@ -402,7 +402,7 @@ UserLoop:
}
func (t *TelegramClient) RegisterPushNotifications(ctx context.Context, pushType bridgev2.PushType, token string) error {
meta := t.userLogin.Metadata.(*UserLoginMetadata)
meta := t.metadata
if meta.PushEncryptionKey == nil {
meta.PushEncryptionKey = random.Bytes(256)
err := t.userLogin.Save(ctx)