Change the length test to use chars().count() instead of len()
This commit is contained in:
parent
452cf0a25d
commit
43d4df272a
@ -37,7 +37,7 @@ async fn on_room_message(event: OriginalSyncRoomMessageEvent, room: Room) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Too short to be a scam lol
|
// Too short to be a scam lol
|
||||||
if text_content.body.len() < 12 { return }
|
if text_content.body.chars().count() < 12 { return }
|
||||||
|
|
||||||
let text_content = text_content.body.to_lowercase();
|
let text_content = text_content.body.to_lowercase();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user