Change author_account to be authors in REST API (#30846)
		
	This commit is contained in:
		
					parent
					
						
							
								6d1c1fd684
							
						
					
				
			
			
				commit
				
					
						096057b845
					
				
			
		
					 9 changed files with 48 additions and 9 deletions
				
			
		|  | @ -36,8 +36,15 @@ export function normalizeStatus(status, normalOldStatus) { | |||
|     normalStatus.poll = status.poll.id; | ||||
|   } | ||||
| 
 | ||||
|   if (status.card?.author_account) { | ||||
|     normalStatus.card = { ...status.card, author_account: status.card.author_account.id }; | ||||
|   if (status.card) { | ||||
|     normalStatus.card = { | ||||
|       ...status.card, | ||||
|       authors: status.card.authors.map(author => ({ | ||||
|         ...author, | ||||
|         accountId: author.account?.id, | ||||
|         account: undefined, | ||||
|       })), | ||||
|     }; | ||||
|   } | ||||
| 
 | ||||
|   if (status.filtered) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue