Skip to content

Commit

Permalink
Merge pull request clansty#141 from sakarie9/fix-text-with-sticker
Browse files Browse the repository at this point in the history
  • Loading branch information
clansty authored Sep 28, 2023
2 parents eba16ac + ca4a4ab commit fca8055
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/services/ForwardService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ export default class ForwardService {
try {
if (elem.type === 'image' && elem.asface
&& !(elem.file as string).toLowerCase().endsWith('.gif')
// 同时存在文字消息就不作为 sticker 发送
&& !event.message.some(it => it.type === 'text')
// 防止在 TG 中一起发送多个 sticker 失败
&& event.message.filter(it => it.type === 'image').length === 1
) {
Expand Down

0 comments on commit fca8055

Please sign in to comment.