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

Chat families #3

Open
r4zzz4k opened this issue Jul 26, 2019 · 6 comments
Open

Chat families #3

r4zzz4k opened this issue Jul 26, 2019 · 6 comments

Comments

@r4zzz4k
Copy link
Contributor

r4zzz4k commented Jul 26, 2019

As we maintain a group of chats, the following things are quite logical to sync across them:

  • Restrictions
  • Admins

Reports sent by users, mentioned in #2, also assume connection between several chats and admin chat.

What do you thing about adding a thing called Family, which has a list of chats and an admin chat bound to it, with accompanying family management commands and mentioned synchronization?

My high-level vision on implementation:
In a chat with bot added admin can send a message /family. In response the bot would create a new family with empty chat list and current chat as an admin chat for it.
In admin chat, one can send /family-add message. The bot would respond with https://telegram.me/[botname]?startgroup=[id] link. This deep link opens chat picker. On selecting the chat bot gets added to it, and the user sends /start@botname message there (which can be removed automatically if the bot is already there and has admin rights or manually if not). This way we can setup linking between a family and new chat.
As soon as that's done and bot is granted admin rights, bot can synchronize mentioned items between chats.

Let me know if you approve the idea and if so, whether you have any notices on the usage flow.

@r4zzz4k
Copy link
Contributor Author

r4zzz4k commented Jul 26, 2019

By the way, right now the bot cannot do any Telegram requests in Rule implementations, so querying whether sender is an admin is impossible. Do you have a vision how that should be dealt with?

@IRus
Copy link
Member

IRus commented Jul 27, 2019

Yes, that what I implicitly assume in #2

By the way, right now the bot cannot do any Telegram requests in Rule implementations, so querying whether sender is an admin is impossible. Do you have a vision how that should be dealt with?

So here we can:

  1. Maintain list of admins/moderators/etc on server side as configuration (stored in db/configuration file/etc), so this is bot-level admin/miderator/etc
  2. Do requests to see is user admin on specific group, this is telegram-group-level admin

I think what we need for bot is bot-level admin, so this can be passed to rule easly, when needed

@r4zzz4k
Copy link
Contributor Author

r4zzz4k commented Jul 28, 2019

I see. So if we have an admin chat bound to a family of communities, it may be logical to consider it's creator as a bot-level admin (I'm thinking that the less configuration is stored by the bot itself, the less are the chances it would de-synchronise with community organization, the more useful it is for the end users. So the second way seems more appropriate to me.

But I guess at some point this can also become an option to configure. For smaller communities it's logical to allow for one family admin without admin chat at all, for larger an option to setup custom admin rules may be needed. Let's start with our specific use-case and extend that on demand.

I'll try to prototype something the following days. By the way, thanks for development instructions, it definitely helped to kick-start experimenting.

@r4zzz4k
Copy link
Contributor Author

r4zzz4k commented Jul 30, 2019

Unrelated note: did you by chance saw Jib? It could replace Dockerfile, removing the split between dist packaging and container creating. The thing I love about it is that it's able to create image without requiring root permissions.

@IRus
Copy link
Member

IRus commented Jul 31, 2019

Yes, I have. Found it interesting, but for me much easier for understanding and support keep java artifacts and docker images separate.

@r4zzz4k
Copy link
Contributor Author

r4zzz4k commented Aug 1, 2019

Got it.

IRus added a commit that referenced this issue Nov 7, 2020
IRus added a commit that referenced this issue Nov 7, 2020
IRus added a commit that referenced this issue Nov 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants