about summary refs log tree commit diff
path: root/Tests/LibMatrix.HomeserverEmulator/Controllers/Users/FilterController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/LibMatrix.HomeserverEmulator/Controllers/Users/FilterController.cs')
-rw-r--r--Tests/LibMatrix.HomeserverEmulator/Controllers/Users/FilterController.cs12
1 files changed, 0 insertions, 12 deletions
diff --git a/Tests/LibMatrix.HomeserverEmulator/Controllers/Users/FilterController.cs b/Tests/LibMatrix.HomeserverEmulator/Controllers/Users/FilterController.cs
index ecbccd4..bdee7bc 100644
--- a/Tests/LibMatrix.HomeserverEmulator/Controllers/Users/FilterController.cs
+++ b/Tests/LibMatrix.HomeserverEmulator/Controllers/Users/FilterController.cs
@@ -14,12 +14,6 @@ public class FilterController(ILogger<FilterController> logger, TokenService tok
     [HttpPost("user/{mxid}/filter")]

     public async Task<object> CreateFilter(string mxid, [FromBody] SyncFilter filter) {

         var token = tokenService.GetAccessToken(HttpContext);

-        if (token is null)

-            throw new MatrixException() {

-                ErrorCode = "M_UNAUTHORIZED",

-                Error = "No token passed."

-            };

-

         var user = await userStore.GetUserByToken(token, false);

         if (user is null)

             throw new MatrixException() {

@@ -36,12 +30,6 @@ public class FilterController(ILogger<FilterController> logger, TokenService tok
     [HttpGet("user/{mxid}/filter/{filterId}")]

     public async Task<SyncFilter> GetFilter(string mxid, string filterId) {

         var token = tokenService.GetAccessToken(HttpContext);

-        if (token is null)

-            throw new MatrixException() {

-                ErrorCode = "M_UNAUTHORIZED",

-                Error = "No token passed."

-            };

-

         var user = await userStore.GetUserByToken(token, false);

         if (user is null)

             throw new MatrixException() {