mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Use User.ID instead of User.Name in ActivityPub API for Person IRI (#23823)
Thanks to @trwnh Close #23802 The ActivityPub id is an HTTPS URI that should remain constant, even if the user changes their name.
This commit is contained in:
		@@ -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
 | 
			
		||||
          }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user