mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 13:36:59 +00:00
fix: disable search for bots
Signed-off-by: Zomatree <me@zomatree.live>
This commit is contained in:
@@ -15,6 +15,10 @@ pub async fn search_messages(
|
||||
user: User,
|
||||
data: Json<v0::DataChannelMessagesSearch>,
|
||||
) -> Result<Json<v0::BulkMessageResponse>> {
|
||||
if user.bot.is_some() {
|
||||
return Err(create_error!(IsBot));
|
||||
}
|
||||
|
||||
let data = data.into_inner();
|
||||
|
||||
if (data.server.is_some() && data.channel.is_some())
|
||||
|
||||
Reference in New Issue
Block a user