(user: any)
| 244 | return { |
| 245 | className: user.className, |
| 246 | userId: longToString(user.userId), |
| 247 | accessHash: longToString(user.accessHash), |
| 248 | }; |
| 249 | } |
| 250 | |
| 251 | function 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); |
no test coverage detected