MCPcopy Create free account
hub / github.com/cloudflare/wildebeest / createPublicNote

Function createPublicNote

backend/src/activitypub/objects/note.ts:25–53  ·  view source on GitHub ↗
(
	domain: string,
	db: Database,
	content: string,
	actor: Actor,
	attachments: Array<objects.APObject> = [],
	extraProperties: any = {}
)

Source from the content-addressed store, hash-verified

23}
24
25export async function createPublicNote(
26 domain: string,
27 db: Database,
28 content: string,
29 actor: Actor,
30 attachments: Array<objects.APObject> = [],
31 extraProperties: any = {}
32): Promise<Note> {
33 const actorId = new URL(actor.id)
34
35 const properties = {
36 attributedTo: actorId,
37 content,
38 to: [PUBLIC_GROUP],
39 cc: [actor.followers.toString()],
40
41 // FIXME: stub values
42 replies: null,
43 sensitive: false,
44 summary: null,
45 tag: [],
46
47 attachment: attachments,
48 inReplyTo: null,
49 ...extraProperties,
50 }
51
52 return (await objects.createObject(domain, db, NOTE, properties, actorId, true)) as Note
53}
54
55export async function createDirectNote(
56 domain: string,

Callers 11

createReplyFunction · 0.90
handle.spec.tsFile · 0.90
accounts.spec.tsFile · 0.90
tags.spec.tsFile · 0.90
timelines.spec.tsFile · 0.90
statuses.spec.tsFile · 0.90
createStatusFunction · 0.90
handleRequestFunction · 0.90
consumer.spec.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected