Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telegram bot command to filter favorites #93

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bengeois
Copy link
Contributor

@bengeois bengeois commented Aug 25, 2021

Try an implementation of this feature request #60

@marklagendijk
Copy link
Owner

I have to try this when I get the time.

I would like this way better if the favorites would be stored per chat, instead of globally. This would make it possible to share the bot with family / friends that live in the same town:

  • Just add all restaurants that anyone finds interesting to your favorites.
  • All your friends / family use your Telegram bot.
  • By setting their personal filter, they only get what they are interested in.

@Molier
Copy link

Molier commented Dec 26, 2023

I have to try this when I get the time.

I would like this way better if the favorites would be stored per chat, instead of globally. This would make it possible to share the bot with family / friends that live in the same town:

  • Just add all restaurants that anyone finds interesting to your favorites.
  • All your friends / family use your Telegram bot.
  • By setting their personal filter, they only get what they are interested in.

is there any news on this feature of sharing it so that multiple users can have separate lists of favourites? And so that they can login with their own account and manage their favourites using their own account?

or a more broad approach of instanced user sessions?

personal filter?
multiple accounts connected to same bot?

@sebastianklein96
Copy link
Contributor

sebastianklein96 commented Dec 26, 2023

Easiest way to achieve multi-tenancy would actually be simulating it. Because of API request limitations per IP it would not be viable sending requests for multiple accounts with one bot.

Simple approach would be making the user able to add / remove favorites by chat, for example using vendor or bag ids. The chat would subscribe to receiving notifications for the bags it added / subscribe to already existing bags. Those bags would be added to one dummy account, especially created and authenticated for the bot, and when the bot detects changes it would send notifications to each subscribed chat. Implementing this would probably have to be supported by starting to use some kind of database to store subscriptions though, for example a local sqlite.

@Molier
Copy link

Molier commented Dec 27, 2023

mmh that sounds pretty doable and a good upgrade indeed, thanks for the info/suggestion. Will try this out after exam period. Having all people receive all notifications in the telegram bot chat and having to 'subscribe' via one account , is quite annoying but not that necessary a fix either.

Let me know though @marklagendijk if you ended up doing something like this already , so I don't end up doing something redundant.

@marklagendijk
Copy link
Owner

I haven't done anything like this. Main reason being that I don't have a real need for it.

The approach sounds fine.
We don't need a database for storing the subscriptions. Just storing it in the settings file, like we're doing with the chats etc. already, is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants