Skip to content

Commit

Permalink
feat: update after schema change
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed Dec 6, 2024
1 parent d520979 commit 308e6fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion telegram/message/peer/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ type plainResolver struct {
}

func (p plainResolver) ResolveDomain(ctx context.Context, domain string) (tg.InputPeerClass, error) {
peer, err := p.raw.ContactsResolveUsername(ctx, domain)
peer, err := p.raw.ContactsResolveUsername(ctx, &tg.ContactsResolveUsernameRequest{
Username: domain,
})
if err != nil {
return nil, errors.Wrap(err, "resolve")
}
Expand Down
4 changes: 3 additions & 1 deletion telegram/peers/resolve.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ func (m *Manager) ResolveDomain(ctx context.Context, domain string) (Peer, error
}

ch := m.sg.DoChan(domain, func() (interface{}, error) {
result, err := m.api.ContactsResolveUsername(ctx, domain)
result, err := m.api.ContactsResolveUsername(ctx, &tg.ContactsResolveUsernameRequest{
Username: domain,
})
if err != nil {
return nil, errors.Wrap(err, "resolve")
}
Expand Down

0 comments on commit 308e6fb

Please sign in to comment.