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

Research way to add Abbot to group in Telegram #58

Closed
bnonni opened this issue Nov 18, 2023 · 2 comments
Closed

Research way to add Abbot to group in Telegram #58

bnonni opened this issue Nov 18, 2023 · 2 comments
Assignees
Labels
research Information gathering to better understand requirements

Comments

@bnonni
Copy link

bnonni commented Nov 18, 2023

Is your feature request related to a problem? Please describe.

  • Telegram identifies group chats with IDs and usernames
  • Could be a chat link or chat name or chat id, etc.

Describe the solution you'd like

  • We need to figure out the best way for a participant in a Telegram channel to identify their chat via our website and request an invoice

Alternative solutions

  • We could assign a globally unique user name to new Abbot users
  • We store this in the database object and show it to them when they signup
@bnonni bnonni added the research Information gathering to better understand requirements label Nov 19, 2023
@saucy-tech
Copy link
Collaborator

Adding abbot to a telegram group turned out to be pretty straightforward but managing the invoice generation outside of Telegram has some challenges, especially if the user has multiple groups with Abbot.

Add Abbot to group in Telegram

  • Adding the Bot: Users can add our bot (@atl_bitlab_bot) to any Telegram group chat using this link: https://t.me/atl_bitlab_bot?startgroup=true.
  • User Interaction: Upon clicking the link, Telegram prompts the user to choose the group chat for adding the bot.
  • Chat ID Capture: After being added to a group, the bot automatically detects and records the chat ID, linking it to the user who invited the bot.

Invoice Request Workflow

  • Initiating on Website: Users visit our webpage to request an invoice, where they enter their Telegram user ID.
  • Handling Multiple Groups: If a user is part of several groups with the bot, we face a challenge in identifying which group chat the invoice is for.

Proposed Solution

  • Bot-User Interaction: Program the bot to contact the user on Telegram after they submit their user ID on our website.
  • Group Chat Selection: The bot presents a list of group chats (with the bot added) that the user is a member of. The user then selects the relevant group for the invoice.
  • Invoice Generation: Once a group chat is selected, the bot uses the linked chat ID to generate and manage the invoice.

Consideration for Simplification

  • All Telegram-Based Process: Considering the various scenarios, such as knowing the group chat ID, knowing the user's username, and managing multiple group memberships, it might be more straightforward to handle the entire invoice process within Telegram rather than through the website.
  • User Experience: This approach could simplify the user experience and ensure more accurate identification of group chats for invoice requests.

@bnonni
Copy link
Author

bnonni commented Dec 5, 2023

This research is perfect and EXACTLY what I was looking for. I can add a Filter to Abbot on the backend that looks for Group Add messages. If the backend server detects a message where Abbot was added to the group, have Abbot respond with a canned message (i.e. "thanks for adding me to your group. You have 50,000 SATs free! 1 message from Abbot = 10 SATs. Once that runs out, you will need to run the /fund command passing an amount of SATs e.g. /fund 1000000). From here, I can handle the entire invoice flow on the backend. I'm going to work on getting this logic added ASAP. Closing this issue.

Thanks for your work here @saucy-tech! Great work!

@bnonni bnonni closed this as completed Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
research Information gathering to better understand requirements
Projects
Development

No branches or pull requests

2 participants