Skip to content

Activities

An activity is a verb + object (plus optional target, foreign_id, time, and a custom payload) posted to a feed. On write, it fans out along every follow edge pointing at that feed (spec §1) — that’s how a post on user:diego ends up in timeline:maya if maya follows diego. Deletes are soft: the activity row is marked deleted, not removed, while its fan-out copies are hard-deleted so the read path never has to filter deleted_at (spec design).

const activity = await client.feed('user', 'maya').addActivity({
verb: 'workout',
object: 'workout:1234',
foreign_id: 'maya-w0', // optional — stable id makes retries idempotent
time: new Date().toISOString(), // optional — defaults server-side
custom: { sport: 'run', durationMin: 45 },
})
// Hits DELETE /v1/activities/:id. The gateway enforces authority = origin_feed —
// deleting an activity you don't own returns FORBIDDEN.
await client.feed('user', 'maya').removeActivity(activity.id)

DropInServer has no delete/remove-activity method — deleting is only exposed through the client SDK’s removeActivity, scoped to the feed that owns the activity.