feat: format message from telegram and upload attachments (#1924)

* feat: format message from telegram and download documents

* fix: remove bool in expression

* refactor: convert to markdown

* refactor: resolve remarks and add support new message types

* refactor: resolve remarks

* feat: add test for mime type

---------

Co-authored-by: Александр Тумайкин <AATumaykin@tsum.ru>
This commit is contained in:
Alexandr Tumaykin
2023-07-13 19:18:44 +03:00
committed by GitHub
parent f074bb1be2
commit c5a1f4c839
15 changed files with 422 additions and 63 deletions

View File

@ -1,9 +1,19 @@
package telegram
type ChatType string
const (
Private = "private"
Group = "group"
SuperGroup = "supergroup"
Channel = "channel"
)
type Chat struct {
ID int `json:"id"`
Title string `json:"title"`
Type string `json:"type"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
ID int `json:"id"`
Title string `json:"title"` // Title for supergroups, channels and group chats
Type ChatType `json:"type"` // Type of chat, can be either “private”, “group”, “supergroup” or “channel”
FirstName string `json:"first_name"` // FirstName of the other party in a private chat
LastName string `json:"last_name"` // LastName of the other party in a private chat
UserName string `json:"username"` // UserName for private chats, supergroups and channels if available
}