ensure bot doesn't reply to its own messages
This commit is contained in:
parent
c40de5fbd1
commit
cc09f22432
1 changed files with 4 additions and 0 deletions
|
@ -210,6 +210,10 @@ impl Bot {
|
|||
ev: &OriginalRoomMessageEvent,
|
||||
room: &Joined,
|
||||
) -> Result<()> {
|
||||
if Some(&*ev.sender) == self.client.user_id() {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let MessageType::Text(TextMessageEventContent { body, .. }) = &ev.content.msgtype else {
|
||||
return Ok(());
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue