removed all "paid" features - no more stars, gifts, or grams

This commit is contained in:
onysd 2026-08-07 01:50:10 +03:00
parent d4451d753c
commit 21d8e91756
165 changed files with 318 additions and 40948 deletions

View file

@ -324,18 +324,6 @@ func collectChannelMessagePeerRefs(msg domain.ChannelMessage, currentChannelID i
userIDs[id] = struct{}{}
}
}
if msg.Action.StarGift != nil {
if id := msg.Action.StarGift.FromUserID; id != 0 && !msg.Action.StarGift.NameHidden {
userIDs[id] = struct{}{}
}
if id := msg.Action.StarGift.PeerUserID; id != 0 {
userIDs[id] = struct{}{}
}
if id := msg.Action.StarGift.PeerChannelID; id != 0 && id != currentChannelID {
channelIDs[id] = struct{}{}
}
}
collectStarGiftUniquePeerRefs(msg.Action.StarGiftUnique, currentChannelID, userIDs, channelIDs)
}
if msg.Reactions != nil {
for _, reaction := range msg.Reactions.Recent {
@ -356,37 +344,6 @@ func collectServiceActionPeerRefs(media *domain.MessageMedia, currentChannelID i
addDomainPeerRef(peer, currentChannelID, userIDs, channelIDs)
}
}
if gift := action.StarGift; gift != nil {
if gift.FromUserID != 0 && !gift.NameHidden {
userIDs[gift.FromUserID] = struct{}{}
}
if gift.PeerUserID != 0 {
userIDs[gift.PeerUserID] = struct{}{}
}
if gift.PeerChannelID != 0 && gift.PeerChannelID != currentChannelID {
channelIDs[gift.PeerChannelID] = struct{}{}
}
addDomainPeerRef(gift.To, currentChannelID, userIDs, channelIDs)
}
collectStarGiftUniquePeerRefs(action.StarGiftUnique, currentChannelID, userIDs, channelIDs)
}
func collectStarGiftUniquePeerRefs(action *domain.MessageStarGiftUniqueAction, currentChannelID int64, userIDs, channelIDs map[int64]struct{}) {
if action == nil {
return
}
if action.FromUserID != 0 {
userIDs[action.FromUserID] = struct{}{}
}
addDomainPeerRef(action.Peer, currentChannelID, userIDs, channelIDs)
addDomainPeerRef(action.Gift.Owner, currentChannelID, userIDs, channelIDs)
addDomainPeerRef(action.Gift.OriginalOwner, currentChannelID, userIDs, channelIDs)
addDomainPeerRef(action.Gift.ReleasedBy, currentChannelID, userIDs, channelIDs)
addDomainPeerRef(action.Gift.ThemePeer, currentChannelID, userIDs, channelIDs)
addDomainPeerRef(action.Gift.Host, currentChannelID, userIDs, channelIDs)
if action.Gift.OriginalFromUserID != 0 && !action.Gift.OriginalNameHidden {
userIDs[action.Gift.OriginalFromUserID] = struct{}{}
}
}
func addDomainPeerRef(peer domain.Peer, currentChannelID int64, userIDs, channelIDs map[int64]struct{}) {