fix: sync stars topup and paid reaction settings
This commit is contained in:
parent
4e18d31e16
commit
1f11b0fd1b
12 changed files with 506 additions and 24 deletions
|
|
@ -569,15 +569,19 @@ func tgChannelFull(view domain.ChannelView, publicBaseURL ...string) *tg.Channel
|
|||
if ch.ReactionPolicy.Limit > 0 {
|
||||
full.SetReactionsLimit(ch.ReactionPolicy.Limit)
|
||||
}
|
||||
if ch.Broadcast && !ch.Megagroup {
|
||||
// Android uses paid_media_allowed as the capability gate for showing the
|
||||
// paid-reaction setting; paid_reactions_available below remains the saved
|
||||
// on/off state.
|
||||
full.SetPaidMediaAllowed(true)
|
||||
full.SetStargiftsAvailable(true)
|
||||
}
|
||||
// paid_reactions_available reflects the saved chat policy, not mere broadcast
|
||||
// capability. Android counts this flag as an extra available reaction in the
|
||||
// settings row, so advertising it without paid_enabled corrupts the UI count.
|
||||
if ch.ReactionPolicy.PaidEnabled {
|
||||
if ch.Broadcast && !ch.Megagroup && ch.ReactionPolicy.PaidEnabled {
|
||||
full.SetPaidReactionsAvailable(true)
|
||||
}
|
||||
if ch.Broadcast && !ch.Megagroup {
|
||||
full.SetStargiftsAvailable(true)
|
||||
}
|
||||
return full
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue