Skip to content

Commit

Permalink
fix: text message send (#15)
Browse files Browse the repository at this point in the history
* fix: Jimps[0] undefined

* fix: seq may not change when asynchronous uploading

* fix: seq may not change when asynchronous uploading

no random, but additional memory and time expenses

* fix: error

---------

Co-authored-by: 时瑾 <shijinn520@gmail.com>
  • Loading branch information
lava081 and sj817 authored Aug 15, 2024
1 parent 1ec7419 commit 8c50d55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,15 @@ class Common {
data?: QRRes
}> {
const urls = this.getUrls(text)
const data = await this.getQrCode(urls)
const data = urls.length ? (await this.getQrCode(urls)) : undefined

/** 使用for循环来替换字符串 保证一致性 */
for (const url of urls) {
text = text.replace(url, '[请扫码查看]')
}
return {
text,
data: urls.length ? data : undefined,
data,
}
}

Expand Down

0 comments on commit 8c50d55

Please sign in to comment.