mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +00:00 
			
		
		
		
	Fix Announce/Delete AP deliver (#7517)
* Fix Announce/Delete AP deliver * Revert "Fix Announce/Delete AP deliver" This reverts commit 0292c5196df48f67bb7914e925560ba69e2b2980. * localOnlyのDeleteをdeliverしないように * null Activityに対するUndoはdeliverしないように
This commit is contained in:
		
							parent
							
								
									4b33c42da7
								
							
						
					
					
						commit
						b16c3798a4
					
				
					 2 changed files with 10 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -1,8 +1,12 @@
 | 
			
		|||
import config from '@/config';
 | 
			
		||||
import { ILocalUser, User } from '../../../models/entities/user';
 | 
			
		||||
 | 
			
		||||
export default (object: any, user: { id: User['id'] }) => ({
 | 
			
		||||
	type: 'Undo',
 | 
			
		||||
	actor: `${config.url}/users/${user.id}`,
 | 
			
		||||
	object
 | 
			
		||||
});
 | 
			
		||||
export default (object: any, user: { id: User['id'] }) => {
 | 
			
		||||
	if (object == null) return null;
 | 
			
		||||
 | 
			
		||||
	return {
 | 
			
		||||
		type: 'Undo',
 | 
			
		||||
		actor: `${config.url}/users/${user.id}`,
 | 
			
		||||
		object
 | 
			
		||||
	};
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -35,7 +35,7 @@ export default async function(user: User, note: Note, quiet = false) {
 | 
			
		|||
		});
 | 
			
		||||
 | 
			
		||||
		//#region ローカルの投稿なら削除アクティビティを配送
 | 
			
		||||
		if (Users.isLocalUser(user)) {
 | 
			
		||||
		if (Users.isLocalUser(user) && !note.localOnly) {
 | 
			
		||||
			let renote: Note | undefined;
 | 
			
		||||
 | 
			
		||||
			// if deletd note is renote
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue