Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
防止在私聊中收到自己发出的消息
Browse files Browse the repository at this point in the history
  • Loading branch information
super1207 committed Dec 6, 2023
1 parent a2735be commit adb404d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/kook_onebot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,10 @@ impl KookOnebot {
self.deal_private_recall(data).await?;
}
} else {
self.deal_private_message_event(data,user_id).await?;
let self_id = self.self_id;
if user_id != self_id {
self.deal_private_message_event(data,user_id).await?;
}
}
Ok(())
}
Expand Down

0 comments on commit adb404d

Please sign in to comment.