Merge pull request #270 from cloudflare/sven/disjoint-link-object

Disjoint Link from Object
pull/272/head
Sven Sauleau 2023-02-13 10:17:36 +00:00 zatwierdzone przez GitHub
commit f5a4a72e70
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 4 dodań i 5 usunięć

Wyświetl plik

@ -1,6 +1,7 @@
import type { APObject } from 'wildebeest/backend/src/activitypub/objects'
// https://www.w3.org/TR/activitystreams-vocabulary/#dfn-link
export interface Link {
type: string
export interface Link extends APObject {
href: URL
name: string
}

Wyświetl plik

@ -2,14 +2,12 @@ import type { Link } from 'wildebeest/backend/src/activitypub/objects/link'
import type { Actor } from 'wildebeest/backend/src/activitypub/actors'
import { urlToHandle } from 'wildebeest/backend/src/utils/handle'
// https://www.w3.org/TR/activitystreams-vocabulary/#dfn-mention
export interface Mention extends Link {}
export function newMention(actor: Actor): Mention {
return {
type: 'Mention',
id: actor.id,
url: actor.id,
href: actor.id,
name: urlToHandle(actor.id),
}