Skip to content

Commit

Permalink
errors: add forward message
Browse files Browse the repository at this point in the history
  • Loading branch information
setval committed Feb 5, 2022
1 parent 775ea71 commit 54d6d11
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ var (
ErrWrongFileIDSymbol = NewError(400, "Bad Request: wrong remote file id specified: can't unserialize it. Wrong last symbol")
ErrWrongTypeOfContent = NewError(400, "Bad Request: wrong type of the web page content")
ErrWrongURL = NewError(400, "Bad Request: wrong HTTP URL specified")
ErrForwardMessage = NewError(400, "Bad Request: administrators of the chat restricted message forwarding")
)

// Forbidden errors
Expand Down Expand Up @@ -228,6 +229,8 @@ func Err(s string) error {
return ErrNotStartedByUser
case ErrUserIsDeactivated.ʔ():
return ErrUserIsDeactivated
case ErrForwardMessage.ʔ():
return ErrForwardMessage
default:
return nil
}
Expand Down

0 comments on commit 54d6d11

Please sign in to comment.