diff --git a/src/github.com/turt2live/matrix-media-repo/api/auth.go b/src/github.com/turt2live/matrix-media-repo/api/auth.go index d8fe4a61b12654a3d50b3f19296c121295ba4b66..0bca41719dc880abe876c473eed78bc7f884b5eb 100644 --- a/src/github.com/turt2live/matrix-media-repo/api/auth.go +++ b/src/github.com/turt2live/matrix-media-repo/api/auth.go @@ -19,7 +19,6 @@ func AccessTokenRequiredRoute(next func(r *http.Request, log *logrus.Entry, user appserviceUserId := util.GetAppserviceUserIdFromRequest(r) userId, err := matrix.GetUserIdFromToken(r.Context(), r.Host, accessToken, appserviceUserId) if err != nil || userId == "" { - log.Error(err) if err != nil && err != matrix.ErrNoToken { log.Error("Error verifying token: ", err) return InternalServerError("Unexpected Error") diff --git a/src/github.com/turt2live/matrix-media-repo/matrix/admin.go b/src/github.com/turt2live/matrix-media-repo/matrix/admin.go index b35e063dac44fc4454a1ca8d8bbd0f9dea20201d..8dd9f39973b3f8f649682bcec6a1be2e11bcd3cf 100644 --- a/src/github.com/turt2live/matrix-media-repo/matrix/admin.go +++ b/src/github.com/turt2live/matrix-media-repo/matrix/admin.go @@ -13,7 +13,7 @@ func IsUserAdmin(ctx context.Context, serverName string, accessToken string) (bo isAdmin := false var replyError error - cb.CallContext(ctx, func() error { + replyError = cb.CallContext(ctx, func() error { mtxClient, err := gomatrix.NewClient(hs.ClientServerApi, "", accessToken) if err != nil { err, replyError = filterError(err) @@ -40,7 +40,7 @@ func ListMedia(ctx context.Context, serverName string, accessToken string, roomI response := &mediaListResponse{} var replyError error - cb.CallContext(ctx, func() error { + replyError = cb.CallContext(ctx, func() error { mtxClient, err := gomatrix.NewClient(hs.ClientServerApi, "", accessToken) if err != nil { err, replyError = filterError(err) diff --git a/src/github.com/turt2live/matrix-media-repo/matrix/auth.go b/src/github.com/turt2live/matrix-media-repo/matrix/auth.go index c8498b1cd95c2e9e78528ea4e235d57c398bd345..23d495bd5c1ea7b7b8c7e3c436d2ab24643ea6c9 100644 --- a/src/github.com/turt2live/matrix-media-repo/matrix/auth.go +++ b/src/github.com/turt2live/matrix-media-repo/matrix/auth.go @@ -19,7 +19,7 @@ func GetUserIdFromToken(ctx context.Context, serverName string, accessToken stri userId := "" var replyError error - cb.CallContext(ctx, func() error { + replyError = cb.CallContext(ctx, func() error { mtxClient, err := gomatrix.NewClient(hs.ClientServerApi, "", accessToken) if err != nil { err, replyError = filterError(err)