Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/stephancill/telegram-open-frame


https://github.com/stephancill/telegram-open-frame

Last synced: 13 days ago
JSON representation

Awesome Lists containing this project

README

        

# Telegram Open Frames

This is a Telegram bot that lets you send and interact with Open Frames frames in a chat.

## Usage

1. Search for a frame inline by starting the message with `@OpenFramesBot `.
2. Select the frame you want to send.
3. The frame will be sent to the chat.

## Limitations

- Text input not supported
- `mint` and `tx` actions are not supported
- Data URL images are not supported
- Frames have to be stored and retrieved from a kv store because button data is too large to be stored in a telegram button callback (limit is 64 bytes)

## Development

1. Install dependencies

```
yarn install
```

2. Copy `.env.sample` to `.env` and fill in the values

3. Start the KV store server

```
docker-compose up
```

4. Start the bot

```
yarn dev
```

5. Set the telegram webhook

```
curl -F "url=/telegram" https://api.telegram.org/bot/setWebhook
```

6. Search for a frame inline by starting the message with `@ `.

## Telegram Open Frames

The proxy will send `clientProtocol: "*@*"` to the server with the intention that the server will serve a frame that does not require authentication. It only sends `buttonIndex` and `state` in `untrustedData`.

This may change in the future when telegram webhook requests are used as authentication somehow.