(bytes: number)
| 53 | }; |
| 54 | |
| 55 | function estimateMediaSizeBytes(message: Api.Message): number { |
| 56 | const doc = (message as any).document; |
| 57 | if (doc && typeof doc.size === "number") { |
| 58 | return Number(doc.size); |
| 59 | } |
| 60 | |
| 61 | const video = (message as any).video; |
| 62 | if (video && typeof video.size === "number") { |
| 63 | return Number(video.size); |
| 64 | } |
| 65 | |
| 66 | const gif = (message as any).gif; |
| 67 | if (gif && typeof gif.size === "number") { |
| 68 | return Number(gif.size); |
no outgoing calls
no test coverage detected