Skip to content

Commit

Permalink
fix: tg 匿名判断
Browse files Browse the repository at this point in the history
  • Loading branch information
clansty committed Dec 18, 2024
1 parent bab8126 commit 40d6f81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main/src/services/ForwardService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ export default class ForwardService {
try {
const tempFiles: FileResult[] = [];
let chain: (string | SendableElem)[] = [];
const senderId = Number(message.senderId || message.sender?.id) || helper.peerToId(message.peerId);
const senderId = Number(message.senderId || message.sender?.id) || pair.tgId;
this.log.debug('senderId', senderId);
// 这条消息在 tg 中被回复的时候显示的
let brief = '', isSpoilerPhoto = false;
Expand All @@ -690,7 +690,7 @@ export default class ForwardService {
if (message.sender instanceof Api.Channel && message.sender.broadcast) {
emoji1 = '📢' + emoji1;
}
else if (message.sender instanceof Api.Chat || message.sender instanceof Api.Channel || message.peerId instanceof Api.PeerChannel) {
else if (message.sender instanceof Api.Chat || message.sender instanceof Api.Channel || !message.senderId) {
emoji1 = '👻' + emoji1;
}
messageHeader = emoji1 + messageHeader;
Expand Down

0 comments on commit 40d6f81

Please sign in to comment.