Fixed 267U.pre2
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import config from "../../../config/index.js";
|
||||
export default ((object, user)=>{
|
||||
if (object == null) return null;
|
||||
const id = typeof object.id === "string" && object.id.startsWith(config.url) ? `${object.id}/undo` : undefined;
|
||||
return {
|
||||
type: "Undo",
|
||||
...id ? {
|
||||
id
|
||||
} : {},
|
||||
actor: `${config.url}/users/${user.id}`,
|
||||
object,
|
||||
published: new Date().toISOString()
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user