Change the length test to use chars().count() instead of len()

This commit is contained in:
0xf8 2023-04-12 01:01:52 -04:00
parent 452cf0a25d
commit 43d4df272a
Signed by: 0xf8
GPG Key ID: 446580D758689584

View File

@ -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();