aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-06-06 16:48:02 +0200
committerlain <lain@soykaf.club>2020-06-06 16:48:02 +0200
commitf4cf4ae16ee84655bf6630cf7e98e9eef2f410cc (patch)
tree1e5dfc892425a1c5da2cf047467c3aed4fc62612 /lib
parentf77d4a302d8ee5999979136290caac556cac8873 (diff)
downloadpleroma-f4cf4ae16ee84655bf6630cf7e98e9eef2f410cc.tar.gz
ChatController: Use new oauth scope *:chats.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/api_spec/operations/chat_operation.ex14
-rw-r--r--lib/pleroma/web/pleroma_api/controllers/chat_controller.ex4
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/pleroma/web/api_spec/operations/chat_operation.ex b/lib/pleroma/web/api_spec/operations/chat_operation.ex
index 6ad325113..74c3ad0bd 100644
--- a/lib/pleroma/web/api_spec/operations/chat_operation.ex
+++ b/lib/pleroma/web/api_spec/operations/chat_operation.ex
@@ -33,7 +33,7 @@ defmodule Pleroma.Web.ApiSpec.ChatOperation do
},
security: [
%{
- "oAuth" => ["write"]
+ "oAuth" => ["write:chats"]
}
]
}
@@ -58,7 +58,7 @@ defmodule Pleroma.Web.ApiSpec.ChatOperation do
},
security: [
%{
- "oAuth" => ["write"]
+ "oAuth" => ["write:chats"]
}
]
}
@@ -120,7 +120,7 @@ defmodule Pleroma.Web.ApiSpec.ChatOperation do
},
security: [
%{
- "oAuth" => ["write"]
+ "oAuth" => ["write:chats"]
}
]
}
@@ -137,7 +137,7 @@ defmodule Pleroma.Web.ApiSpec.ChatOperation do
},
security: [
%{
- "oAuth" => ["read"]
+ "oAuth" => ["read:chats"]
}
]
}
@@ -161,7 +161,7 @@ defmodule Pleroma.Web.ApiSpec.ChatOperation do
},
security: [
%{
- "oAuth" => ["read"]
+ "oAuth" => ["read:chats"]
}
]
}
@@ -187,7 +187,7 @@ defmodule Pleroma.Web.ApiSpec.ChatOperation do
},
security: [
%{
- "oAuth" => ["write"]
+ "oAuth" => ["write:chats"]
}
]
}
@@ -212,7 +212,7 @@ defmodule Pleroma.Web.ApiSpec.ChatOperation do
},
security: [
%{
- "oAuth" => ["write"]
+ "oAuth" => ["write:chats"]
}
]
}
diff --git a/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex b/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex
index d6b3415d1..983550b13 100644
--- a/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex
+++ b/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex
@@ -23,7 +23,7 @@ defmodule Pleroma.Web.PleromaAPI.ChatController do
plug(
OAuthScopesPlug,
- %{scopes: ["write:statuses"]}
+ %{scopes: ["write:chats"]}
when action in [
:post_chat_message,
:create,
@@ -35,7 +35,7 @@ defmodule Pleroma.Web.PleromaAPI.ChatController do
plug(
OAuthScopesPlug,
- %{scopes: ["read:statuses"]} when action in [:messages, :index, :show]
+ %{scopes: ["read:chats"]} when action in [:messages, :index, :show]
)
plug(OpenApiSpex.Plug.CastAndValidate, render_error: Pleroma.Web.ApiSpec.RenderError)