Grommash9 / tg_chat_mate

https://grommash9.github.io/tg_chat_mate/
MIT License
5 stars 6 forks source link

Endpoint for Ban users #80

Closed Grommash9 closed 8 months ago

Grommash9 commented 9 months ago

We should have endpoint in tg bot to ban users, after ban user will still be able to send messages but we will not save them into database and will not notify anybody about it

lifquti commented 8 months ago

in this case you mean add endpoint, create in db banned list and add new filter for banned id?

Grommash9 commented 8 months ago

I think we can just add the field for user, because mongoDB allow us to have users without'banned' field on user creation, and we can add it later.

Also now i understood we also want to be able to unban them. So endpoint should use 'user_id' and new banned boolean as True or False and we should add these field or update

So we will have 3 states

Also as you mentioned we want to have a filer to just skip all updates from banned users.

Grommash9 commented 8 months ago

It should use auth decorator like other api's and return error if we can find the user