MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / serializeUser

Function serializeUser

tmp_admin/tmp_admin.ts:246–256  ·  view source on GitHub ↗
(user: any)

Source from the content-addressed store, hash-verified

244 return {
245 className: user.className,
246 userId: longToString(user.userId),
247 accessHash: longToString(user.accessHash),
248 };
249}
250
251function deserializeChannel(stored: StoredChannel): any {
252 const args = {
253 channelId: bigInt(stored.channelId),
254 accessHash: bigInt(stored.accessHash),
255 };
256 if (stored.className === "InputChannel") {
257 return new Api.InputChannel(args);
258 }
259 return new Api.InputPeerChannel(args);

Callers 1

persistJobMethod · 0.85

Calls 1

longToStringFunction · 0.85

Tested by

no test coverage detected