PeerTube/server/lib/activitypub/activity.ts

10 lines
145 B
TypeScript

function getAPId (object: string | { id: string }) {
if (typeof object === 'string') return object
return object.id
}
export {
getAPId
}