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

This commit is contained in:
Artem Tsyrulnikov
2026-01-21 02:41:20 +03:00
parent 233afb5451
commit b5695360c2
27 changed files with 1026 additions and 217 deletions

View File

@@ -16,12 +16,16 @@ type Post struct {
}
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)
}
return Post{
ID: uuid.New(),
ChannelID: channel.ID,
MessageID: messageID,
Text: text,
Link: fmt.Sprintf("https://t.me/%s/%d", channel.Username, messageID),
Link: link,
Views: views,
}
}