We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For example: https://core.telegram.org/constructor/peerNotifySettings.
Should be:
func (p *PeerNotifySettings) Decode(b *bin.Buffer) error { if p == nil { return fmt.Errorf("can't decode peerNotifySettings#af509d20 to nil") } if err := b.ConsumeID(PeerNotifySettingsTypeID); err != nil { return fmt.Errorf("unable to decode peerNotifySettings#af509d20: %w", err) } { if err := p.Flags.Decode(b); err != nil { return fmt.Errorf("unable to decode peerNotifySettings#af509d20: field flags: %w", err) } } if p.Flags.Has(0) { value, err := b.Bool() if err != nil { return fmt.Errorf("unable to decode peerNotifySettings#af509d20: field show_previews: %w", err) } r.ShowPreviews = value } if p.Flags.Has(1) { value, err := b.Bool() if err != nil { return fmt.Errorf("unable to decode peerNotifySettings#af509d20: field silent: %w", err) } r.Silent = value } if p.Flags.Has(2) { value, err := b.Int() if err != nil { return fmt.Errorf("unable to decode peerNotifySettings#af509d20: field mute_until: %w", err) } p.MuteUntil = value } if p.Flags.Has(3) { value, err := b.String() if err != nil { return fmt.Errorf("unable to decode peerNotifySettings#af509d20: field sound: %w", err) } p.Sound = value } return nil }
Now:
td/tg/tl_peer_notify_settings_gen.go
Lines 142 to 171 in 0fa234c
The text was updated successfully, but these errors were encountered:
Seems like we interpret all Bool values as True (the difference between them is that True encoded in bitflag where Bool is not)
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
For example: https://core.telegram.org/constructor/peerNotifySettings.
Should be:
Now:
td/tg/tl_peer_notify_settings_gen.go
Lines 142 to 171 in 0fa234c
The text was updated successfully, but these errors were encountered: