приватные каналы

This commit is contained in:
Artem Tsyrulnikov
2026-01-21 12:16:02 +03:00
parent b5695360c2
commit 2c0dcbef97
7 changed files with 59 additions and 89 deletions

View File

@@ -19,6 +19,8 @@ func NewPost(channel Channel, messageID int, text string, views int) Post {
link := ""
if channel.Username != "" {
link = fmt.Sprintf("https://t.me/%s/%d", channel.Username, messageID)
} else if channel.TelegramID != 0 {
link = fmt.Sprintf("https://t.me/c/%d/%d", ChannelIDFromChatID(channel.TelegramID), messageID)
}
return Post{
ID: uuid.New(),