diff options
author | Giteabot <teabot@gitea.io> | 2023-04-03 23:41:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-03 22:41:57 -0500 |
commit | 9836b7db7baf896c3d141270ce8ba52944ab146c (patch) | |
tree | 53a1f8a13c41768b2d331a6183d6cdf9f82859cc /templates | |
parent | d752f0d7d02e3e7ce19a1f8feca9394b4f8e8c12 (diff) | |
download | gitea-9836b7db7baf896c3d141270ce8ba52944ab146c.tar.gz gitea-9836b7db7baf896c3d141270ce8ba52944ab146c.zip |
Use User.ID instead of User.Name in ActivityPub API for Person IRI (#23823) (#23905)
Backport #23823 by @wxiaoguang
Thanks to @trwnh
Close #23802
The ActivityPub id is an HTTPS URI that should remain constant, even if
the user changes their name.
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/swagger/v1_json.tmpl | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 9bab4ced80..c9bba3ae51 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -23,7 +23,7 @@ }, "basePath": "{{AppSubUrl | JSEscape | Safe}}/api/v1", "paths": { - "/activitypub/user/{username}": { + "/activitypub/user-id/{user-id}": { "get": { "produces": [ "application/json" @@ -35,9 +35,9 @@ "operationId": "activitypubPerson", "parameters": [ { - "type": "string", - "description": "username of the user", - "name": "username", + "type": "integer", + "description": "user ID of the user", + "name": "user-id", "in": "path", "required": true } @@ -49,7 +49,7 @@ } } }, - "/activitypub/user/{username}/inbox": { + "/activitypub/user-id/{user-id}/inbox": { "post": { "produces": [ "application/json" @@ -61,9 +61,9 @@ "operationId": "activitypubPersonInbox", "parameters": [ { - "type": "string", - "description": "username of the user", - "name": "username", + "type": "integer", + "description": "user ID of the user", + "name": "user-id", "in": "path", "required": true } |