Show signin button in case of an auth error

This commit is contained in:
r 2021-10-23 13:41:41 +00:00
parent 816281c225
commit 7d389d2258
2 changed files with 23 additions and 3 deletions

View file

@ -114,7 +114,8 @@ func (s *service) ErrorPage(c *client, err error, retry bool) error {
var sessionErr bool
if err != nil {
errStr = err.Error()
if err == errInvalidSession || err == errInvalidCSRFToken {
if me, ok := err.(mastodon.Error); ok && me.IsAuthError() ||
err == errInvalidSession || err == errInvalidCSRFToken {
sessionErr = true
}
}