(stored: StoredChannel)
| 256 | if (stored.className === "InputChannel") { |
| 257 | return new Api.InputChannel(args); |
| 258 | } |
| 259 | return new Api.InputPeerChannel(args); |
| 260 | } |
| 261 | |
| 262 | function deserializeUser(stored: StoredUser): any { |
| 263 | const args = { |
| 264 | userId: bigInt(stored.userId), |
| 265 | accessHash: bigInt(stored.accessHash), |
| 266 | }; |
| 267 | if (stored.className === "InputUser") { |
| 268 | return new Api.InputUser(args); |
| 269 | } |
| 270 | return new Api.InputPeerUser(args); |