mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +00:00 
			
		
		
		
	Send actor in Undo Follow
This commit is contained in:
		
							parent
							
								
									68a7661f08
								
							
						
					
					
						commit
						a39aaf6eb1
					
				
					 3 changed files with 7 additions and 3 deletions
				
			
		| 
						 | 
					@ -1,4 +1,8 @@
 | 
				
			||||||
export default (object: any) => ({
 | 
					import config from '../../../config';
 | 
				
			||||||
 | 
					import { ILocalUser, IUser } from "../../../models/user";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default (object: any, user: ILocalUser | IUser) => ({
 | 
				
			||||||
	type: 'Undo',
 | 
						type: 'Undo',
 | 
				
			||||||
 | 
						actor: `${config.url}/users/${user._id}`,
 | 
				
			||||||
	object
 | 
						object
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -56,7 +56,7 @@ export default async function(follower: IUser, followee: IUser) {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (isLocalUser(follower) && isRemoteUser(followee)) {
 | 
						if (isLocalUser(follower) && isRemoteUser(followee)) {
 | 
				
			||||||
		const content = pack(renderUndo(renderFollow(follower, followee)));
 | 
							const content = pack(renderUndo(renderFollow(follower, followee), follower));
 | 
				
			||||||
		deliver(follower, content, followee.inbox);
 | 
							deliver(follower, content, followee.inbox);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,7 +8,7 @@ import { publishUserStream } from '../../../stream';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default async function(followee: IUser, follower: IUser) {
 | 
					export default async function(followee: IUser, follower: IUser) {
 | 
				
			||||||
	if (isRemoteUser(followee)) {
 | 
						if (isRemoteUser(followee)) {
 | 
				
			||||||
		const content = pack(renderUndo(renderFollow(follower, followee)));
 | 
							const content = pack(renderUndo(renderFollow(follower, followee), follower));
 | 
				
			||||||
		deliver(follower as ILocalUser, content, followee.inbox);
 | 
							deliver(follower as ILocalUser, content, followee.inbox);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue