fix парсер
This commit is contained in:
@@ -96,7 +96,7 @@ func extractChannelMeta(currentChannel domain.Channel, chats []tg.ChatClass) *do
|
||||
}
|
||||
|
||||
username := ""
|
||||
if usernameVal, ok := ch.GetUsername(); ok {
|
||||
if usernameVal, ok := ch.GetUsername(); ok && usernameVal != "" {
|
||||
username = usernameVal
|
||||
}
|
||||
|
||||
@@ -107,12 +107,13 @@ func extractChannelMeta(currentChannel domain.Channel, chats []tg.ChatClass) *do
|
||||
}
|
||||
|
||||
updated := domain.Channel{
|
||||
ID: currentChannel.ID,
|
||||
TelegramID: domain.ChatIDFromChannelID(ch.ID),
|
||||
Username: username,
|
||||
Title: ch.Title,
|
||||
AccessHash: accessHash,
|
||||
Pts: currentChannel.Pts,
|
||||
ID: currentChannel.ID,
|
||||
TelegramID: domain.ChatIDFromChannelID(ch.ID),
|
||||
Username: username,
|
||||
Title: ch.Title,
|
||||
AccessHash: accessHash,
|
||||
Pts: currentChannel.Pts,
|
||||
IsAccessible: currentChannel.IsAccessible,
|
||||
}
|
||||
|
||||
return &updated
|
||||
|
||||
Reference in New Issue
Block a user