Updating Session Persistence with all valid persistence calls (#5085)

* Updating Session Persistence with all valid persistence calls

* Spacing fixes

---------

Co-authored-by: Zach H <zahalpern+github@gmail.com>
This commit is contained in:
Joseph Insalaco 2024-07-29 13:25:33 -04:00 committed by GitHub
parent ef4413633a
commit cf1f4f12a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 193 additions and 26 deletions

View file

@ -1,7 +1,9 @@
import webClient from '../../WebClient';
import { SessionPersistence } from '../../persistence';
import { common } from 'protobufjs';
import IBytesValue = common.IBytesValue;
export function accountImage(image: unknown): void {
export function accountImage(image: IBytesValue): void {
const command = webClient.protobuf.controller.Command_AccountImage.create({ image });
const sc = webClient.protobuf.controller.SessionCommand.create({ '.Command_AccountImage.ext': command });
@ -10,7 +12,7 @@ export function accountImage(image: unknown): void {
switch (responseCode) {
case webClient.protobuf.controller.Response.ResponseCode.RespOk:
SessionPersistence.accountImageChanged();
SessionPersistence.accountImageChanged(image);
break;
case webClient.protobuf.controller.Response.ResponseCode.RespFunctionNotAllowed:
console.log('Not allowed');