Skip to content

Commit

Permalink
chore: 优化
Browse files Browse the repository at this point in the history
  • Loading branch information
clansty committed Jan 21, 2025
1 parent add93d8 commit 5176e72
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion main/src/client/NapCatClient/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const messageElemToNapCatSendable = async (elem: SendableElem): Promise<{
file: elem.file,
summary: ('brief' in elem && elem.brief) || env.IMAGE_SUMMARY || (`[Q2TG ${elem.type}]`),
name: elem.type,
sub_type: ('asface' in elem && elem.asface) ? 1 : 0,
sub_type: ('asface' in elem && elem.asface) ? 7 : 0,
},
} as any,
tempFiles,
Expand Down
3 changes: 0 additions & 3 deletions main/src/helpers/forwardHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,6 @@ export default {
else {
res = '未知';
}
if (res.length > 25) {
res = res.slice(0, 25) + '…';
}
return res;
},

Expand Down
2 changes: 1 addition & 1 deletion main/src/services/ForwardService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ export default class ForwardService {
if (senderId === pair.tgId && !message.sender) {
userDisplayName = helper.getUserDisplayName(message.chat);
}
let messageHeader = userDisplayName +
let messageHeader = (userDisplayName.length > 25 ? userDisplayName.substring(0, 25) + '…' : userDisplayName) +
(message.forward ? ' 转发自 ' +
// 要是隐私设置了,应该会有这个,然后下面两个都获取不到
(message.fwdFrom?.fromName ||
Expand Down

0 comments on commit 5176e72

Please sign in to comment.