(url: string)
| 70 | } |
| 71 | |
| 72 | private async fetchFile(url: string) { |
| 73 | const res = await uri2local(this.ctx, url) |
| 74 | if (!res.success) { |
| 75 | this.ctx.logger.error(res.errMsg) |
| 76 | throw Error(res.errMsg) |
| 77 | } |
| 78 | if (!res.isLocal) { |
| 79 | this.deleteAfterSentFiles.push(res.path) |
| 80 | } |
| 81 | return res.path |
| 82 | } |
| 83 | |
| 84 | private async getPeerAndElementsFromMsgId(msgId: string): Promise<{ peer: NT.Peer, elements: NT.MessageElement[] } | undefined> { |
| 85 | this.peer ??= await getPeer(this.ctx, this.channelId) |