Fixed 267U.pre2
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import follow from "../../../services/following/create.js";
|
||||
import DbResolver from "../db-resolver.js";
|
||||
export default (async (actor, activity)=>{
|
||||
const dbResolver = new DbResolver();
|
||||
const followee = await dbResolver.getUserFromApId(activity.object);
|
||||
if (followee == null) {
|
||||
return "skip: followee not found";
|
||||
}
|
||||
if (followee.host != null) {
|
||||
return "skip: user you are trying to follow is not a local user";
|
||||
}
|
||||
await follow(actor, followee, activity.id);
|
||||
return "ok";
|
||||
});
|
||||
Reference in New Issue
Block a user