7a04f298d2
- update to latest telegram layer - remove some references to fields in tg.Entities that don't exist in the schema - originally added here: https://github.com/beeper/td/commit/820929062a2ba0104397bc01235ab58a9cff780e - referenced here - https://github.com/mautrix/telegramgo/commit/124f0967ed195b5a380c9bd02e170ada9710dde3 - https://github.com/mautrix/telegramgo/commit/4205047aab2e0639217148b5d125bfaab668bd8e
28 lines
586 B
Go
28 lines
586 B
Go
package peers
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"go.mau.fi/mautrix-telegram/pkg/gotd/tg"
|
|
)
|
|
|
|
// PhoneNotFoundError is returned when Manager unable to find contact with given phone.
|
|
type PhoneNotFoundError struct {
|
|
Phone string
|
|
}
|
|
|
|
// Error implements error.
|
|
func (c *PhoneNotFoundError) Error() string {
|
|
return "contact not found"
|
|
}
|
|
|
|
// PeerNotFoundError is returned when Manager unable to find Peer with given tg.PeerClass.
|
|
type PeerNotFoundError struct {
|
|
Peer tg.PeerClass
|
|
}
|
|
|
|
// Error implements error.
|
|
func (p *PeerNotFoundError) Error() string {
|
|
return fmt.Sprintf("can't resolve %v", p.Peer)
|
|
}
|