ubiquity-os / plugins-wishlist

0 stars 2 forks source link

Telegram GitHub Issue "Workroom" #25

Open 0x4007 opened 3 months ago

0x4007 commented 3 months ago

I realize that some projects require collaboration, and our team has a natural tendency to direct message each other. The problem with this approach is that the collaborative research in direct messages is not auditable. The conversation that occurred would be useful for future reference to post a summary to the completed task.

It would be nice if as soon as a task is started, the bot can post a link to a freshly generated telegram chat room that acts as a collaborative "work room" to solve that particular task

Once the task is closed as complete, we can use ChatGPT to summarize the essential details from the telegram group chat and post it to the GitHub issue as a conversation summary for future reference

Inventing the telegram integration will probably take some time so I'll set this to a week.


It would be nice to get automatically kicked from the chat when the task is completed so that our telegrams don't get cluttered with these.

jordan-ae commented 2 months ago

/start

ubiquibot[bot] commented 2 months ago

DeadlineMon, Jul 15, 9:47 AM UTC
Registered Wallet 0x2F05fD58023B0a95d1866aa0A3b672cEf05945c5
Tips:
ubiquibot[bot] commented 2 months ago
# No linked pull requests to close
jordan-ae commented 1 month ago

/start

ubiquibot-dev[bot] commented 1 month ago
DeadlineThu, Aug 15, 12:06 PM UTC
Registered Wallet 0x2F05fD58023B0a95d1866aa0A3b672cEf05945c5
Tips:
<ul>
<li>Use <code>/wallet 0x0000...0000</code> if you want to update your registered payment wallet address.</li>
<li>Be sure to open a draft pull request as soon as possible to communicate updates on your progress.</li>
<li>Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the task.</li>
<ul>
ubiquibot[bot] commented 1 month ago

Warning! This task was created over 44 days ago. Please confirm that this issue specification is accurate before starting.
DeadlineThu, Aug 15, 12:06 PM UTC
Registered Wallet 0x2F05fD58023B0a95d1866aa0A3b672cEf05945c5
Tips:
ubiquibot[bot] commented 1 month ago
# No linked pull requests to close
ubiquibot[bot] commented 1 month ago

@jordan-ae the deadline is at 2024-08-16T12:35:35.674Z

DivineDB commented 1 month ago

/start

ubiquibot[bot] commented 1 month ago
! Skipping '/start' because the issue is already assigned.
jordan-ae commented 1 month ago

@0x4007 I encountered a blocker with the Telegram integration plugin. Initially, the plan was to create a bot using BotFather, similar to our previous Telegram bot. However, according to Telegram's latest documentation, bots are unable to create Telegram channels—only human users can do this, likely to prevent spamming.

To work around this limitation, I opted to use the gram-js library, which allows us to create channels via a Telegram app associated with an existing user account. The challenge here is that Telegram requires a phone number for authentication and sends a code that must be manually entered to pass 2FA. Fortunately, this authentication process only needs to be done once. After the first successful authentication, a session string is generated. This session string remains valid indefinitely unless explicitly revoked, so we won’t need to re-authenticate in the future.

Given this requirement, we'll probably have to create a dedicated Telegram user for Ubiquity, which will be used to power the plugin.

I've made some progress and have successfully managed to create a Telegram channel when a task starts and close/delete the channel when the task is completed. I'm submitting a PR with the current state of the implementation asap.

0x4007 commented 1 month ago

https://t.me/UbiquityOS is ready to be used.

Keyrxng commented 3 weeks ago

QA: https://github.com/ubq-testing/telegram-bot/issues/4#issuecomment-2321198296

It is not based on https://github.com/ubiquity/ubiquibot-telegram at all and uses the plugin-template as a foundation. I'll create a repo I can PR against as it looks like the one I made was deleted (I'm confident that I did make it)

0x4007 commented 3 weeks ago

Perhaps there is an opportunity to use Telegram apps to solve this problem somehow.

Keyrxng commented 3 weeks ago

Perhaps there is an opportunity to use Telegram apps to solve this problem somehow.

That's essentially what I have been trying I'm sure as the MTProto API is for clients and apps as far as I understand it while the Bot API is a simplified rest api.

or do you mean mini apps?

Keyrxng commented 3 weeks ago

0x4007 via telegram:

  1. Bot makes group chat
  2. Bot posts link when task is priced.
  3. Task is closed and bot kicks everybody from group chat People manually join by using the link

So a new issue is created and after a price label is applied the bot creates a workroom, which is it's own telegram group chat and it posts a link to it.

At this point no one is in it so the core team member(s) assigning the labels and creating the task should be required to join the workroom immediately so there is at least one person in it in the event a contributor joins it. So they'd effectively be the 'knowledge base' for that task via telegram pretty much?

Should our telegram bot also be invited into the chat directly too?


We'll need to create db entry for each chat that we create and have the plugin event run on issues.labeled or similar as issues.opened doesn't work with this approach. We'd check if a chat exists in supabase for that task, create if not. So for every new issue we'll need to store taskTitle, chatId, embeddings.

If we kick everyone from the chat once the issue is complete and then the issue is reopened should we post a new chatroom link or the same link for the original chat?

Should we standardize workroom titles with a prefix/format or just use the raw task title?

0x4007 commented 2 weeks ago

It seems that our base rate multiplier for priority levels must have been reset to default since the bot upgrade.