правки

This commit is contained in:
Artem Tsyrulnikov
2026-02-03 14:12:23 +03:00
parent 791f0ad5c0
commit 26a5792665
5 changed files with 62 additions and 101 deletions

View File

@@ -95,7 +95,8 @@ func extractChannelMeta(currentChannel domain.Channel, chats []tg.ChatClass) *do
continue
}
username := ""
// Preserve username if Telegram doesn't provide a new one (private channels may not have username)
username := currentChannel.Username
if usernameVal, ok := ch.GetUsername(); ok && usernameVal != "" {
username = usernameVal
}
@@ -112,6 +113,7 @@ func extractChannelMeta(currentChannel domain.Channel, chats []tg.ChatClass) *do
Username: username,
Title: ch.Title,
AccessHash: accessHash,
InviteLink: currentChannel.InviteLink, // Preserve invite link (never returned in channel diff)
Pts: currentChannel.Pts,
IsAccessible: currentChannel.IsAccessible,
}