mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 17:03:49 +01:00
fix: direct boost (#9783)
Sorry to create PR multiple times. I should have included this in #9778. Co-authored-by: naskya <m@naskya.net> Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9783 Co-authored-by: naskya <naskya@noreply.codeberg.org> Co-committed-by: naskya <naskya@noreply.codeberg.org>
This commit is contained in:
parent
f3465bed94
commit
c2883ea95b
@ -4,6 +4,10 @@ import type { Note } from "@/models/entities/note.js";
|
||||
export default (object: any, note: Note) => {
|
||||
const attributedTo = `${config.url}/users/${note.userId}`;
|
||||
|
||||
const mentions = (
|
||||
JSON.parse(note.mentionedRemoteUsers) as IMentionedRemoteUsers
|
||||
).map((x) => x.uri);
|
||||
|
||||
let to: string[] = [];
|
||||
let cc: string[] = [];
|
||||
|
||||
@ -13,9 +17,10 @@ export default (object: any, note: Note) => {
|
||||
} else if (note.visibility === "home") {
|
||||
to = [`${attributedTo}/followers`];
|
||||
cc = ["https://www.w3.org/ns/activitystreams#Public"];
|
||||
} else if (note.visibility === 'followers') {
|
||||
} else if (note.visibility === "followers") {
|
||||
to = [`${attributedTo}/followers`];
|
||||
cc = [];
|
||||
} else if (note.visibility === "specified") {
|
||||
to = mentions;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user