Fix mute duration not being shown in list of muted accounts in web UI (#32388)
This commit is contained in:
		
							parent
							
								
									3b07fe1bba
								
							
						
					
					
						commit
						22fd767425
					
				| 
						 | 
					@ -13,7 +13,7 @@ export interface ApiAccountRoleJSON {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// See app/serializers/rest/account_serializer.rb
 | 
					// See app/serializers/rest/account_serializer.rb
 | 
				
			||||||
export interface ApiAccountJSON {
 | 
					export interface BaseApiAccountJSON {
 | 
				
			||||||
  acct: string;
 | 
					  acct: string;
 | 
				
			||||||
  avatar: string;
 | 
					  avatar: string;
 | 
				
			||||||
  avatar_static: string;
 | 
					  avatar_static: string;
 | 
				
			||||||
| 
						 | 
					@ -45,3 +45,12 @@ export interface ApiAccountJSON {
 | 
				
			||||||
  memorial?: boolean;
 | 
					  memorial?: boolean;
 | 
				
			||||||
  hide_collections: boolean;
 | 
					  hide_collections: boolean;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// See app/serializers/rest/muted_account_serializer.rb
 | 
				
			||||||
 | 
					export interface ApiMutedAccountJSON extends BaseApiAccountJSON {
 | 
				
			||||||
 | 
					  mute_expires_at?: string | null;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// For now, we have the same type representing both `Account` and `MutedAccount`
 | 
				
			||||||
 | 
					// objects, but we should refactor this in the future.
 | 
				
			||||||
 | 
					export type ApiAccountJSON = ApiMutedAccountJSON;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -95,6 +95,9 @@ export const accountDefaultValues: AccountShape = {
 | 
				
			||||||
  limited: false,
 | 
					  limited: false,
 | 
				
			||||||
  moved: null,
 | 
					  moved: null,
 | 
				
			||||||
  hide_collections: false,
 | 
					  hide_collections: false,
 | 
				
			||||||
 | 
					  // This comes from `ApiMutedAccountJSON`, but we should eventually
 | 
				
			||||||
 | 
					  // store that in a different object.
 | 
				
			||||||
 | 
					  mute_expires_at: null,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const AccountFactory = ImmutableRecord<AccountShape>(accountDefaultValues);
 | 
					const AccountFactory = ImmutableRecord<AccountShape>(accountDefaultValues);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue