(
domain: string,
db: Database,
content: string,
actor: Actor,
targetActors: Array<Actor>,
attachment: Array<objects.APObject> = [],
extraProperties: any = {}
)
| 53 | } |
| 54 | |
| 55 | export async function createDirectNote( |
| 56 | domain: string, |
| 57 | db: Database, |
| 58 | content: string, |
| 59 | actor: Actor, |
| 60 | targetActors: Array<Actor>, |
| 61 | attachment: Array<objects.APObject> = [], |
| 62 | extraProperties: any = {} |
| 63 | ): Promise<Note> { |
| 64 | const actorId = new URL(actor.id) |
| 65 | |
| 66 | const properties = { |
| 67 | attributedTo: actorId, |
| 68 | content, |
| 69 | to: targetActors.map((a) => a.id.toString()), |
| 70 | cc: [], |
| 71 | |
| 72 | // FIXME: stub values |
| 73 | inReplyTo: null, |
| 74 | replies: null, |
| 75 | sensitive: false, |
| 76 | summary: null, |
| 77 | tag: [], |
| 78 | attachment, |
| 79 | |
| 80 | ...extraProperties, |
| 81 | } |
| 82 | |
| 83 | return (await objects.createObject(domain, db, NOTE, properties, actorId, true)) as Note |
| 84 | } |
no outgoing calls
no test coverage detected