Skip to content

Commit f75c19c

Browse files
committed
Actor.cat property (misskey:isCat)
1 parent 0c06abe commit f75c19c

File tree

11 files changed

+670
-37
lines changed

11 files changed

+670
-37
lines changed

CHANGES.md

+18
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,24 @@ To be released.
102102
- The first parameter of the `InboxListener` callback type became
103103
`InboxContext` (was `Context`).
104104

105+
- Added `cat` property to `Actor` type in Activity Vocabulary API.
106+
107+
- Added `Application.cat` property.
108+
- `new Application()` constructor now accepts `cat` option.
109+
- `Application.clone()` method now accepts `cat` option.
110+
- Added `Group.cat` property.
111+
- `new Group()` constructor now accepts `cat` option.
112+
- `Group.clone()` method now accepts `cat` option.
113+
- Added `Organization.cat` property.
114+
- `new Organization()` constructor now accepts `cat` option.
115+
- `Organization.clone()` method now accepts `cat` option.
116+
- Added `Person.cat` property.
117+
- `new Person()` constructor now accepts `cat` option.
118+
- `Person.clone()` method now accepts `cat` option.
119+
- Added `Service.cat` property.
120+
- `new Service()` constructor now accepts `cat` option.
121+
- `Service.clone()` method now accepts `cat` option.
122+
105123
- The `Context.parseUri()` method's parameter type became `URL | null`
106124
(was `URL`).
107125

docs/manual/vocab.md

+2
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ property.
9696
> | [`attributedTo`] | `Object.getAttributions()` |
9797
> | [`hreflang`] | `Link.language` |
9898
> | [`inReplyTo`] | `Object.getReplyTargets()` |
99+
> | [`isCat`] | `Application.cat`/`Group.cat`/`Organization.cat`/`Person.cat`/`Service.cat` |
99100
> | [`oneOf`] | `Question.getExclusiveOptions()` |
100101
> | [`orderedItems`] | `OrderedCollection.getItems()` |
101102
> | [`publicKeyMultibase`] | `Multikey.publicKey` |
@@ -109,6 +110,7 @@ property.
109110
[`attributedTo`]: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-attributedto
110111
[`hreflang`]: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-hreflang
111112
[`inReplyTo`]: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-inreplyto
113+
[`isCat`]: https://misskey-hub.net/ns#iscat
112114
[`oneOf`]: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-oneof
113115
[`orderedItems`]: https://www.w3.org/TR/activitystreams-vocabulary/#dfn-items
114116
[`publicKeyMultibase`]: https://www.w3.org/TR/controller-document/#dfn-publickeymultibase

src/codegen/__snapshots__/class.test.ts.snap

+532-22
Large diffs are not rendered by default.

src/federation/handler.test.ts

+4
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ test("handleActor()", async () => {
202202
schema: "http://schema.org#",
203203
PropertyValue: "schema:PropertyValue",
204204
value: "schema:value",
205+
misskey: "https://misskey-hub.net/ns#",
206+
isCat: "misskey:isCat",
205207
},
206208
],
207209
id: "https://example.com/users/someone",
@@ -296,6 +298,8 @@ test("handleActor()", async () => {
296298
schema: "http://schema.org#",
297299
PropertyValue: "schema:PropertyValue",
298300
value: "schema:value",
301+
misskey: "https://misskey-hub.net/ns#",
302+
isCat: "misskey:isCat",
299303
},
300304
],
301305
id: "https://example.com/users/someone",

src/vocab/__snapshots__/vocab.test.ts.snap

+30-15
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,8 @@ snapshot[`Deno.inspect(Application) [auto] 1`] = `
907907
suspended: true,
908908
memorial: true,
909909
indexable: true,
910-
aliases: [ Application {}, Group {}, Organization {}, Person {}, Service {} ]
910+
aliases: [ Application {}, Group {}, Organization {}, Person {}, Service {} ],
911+
cat: true
911912
}'
912913
`;
913914

@@ -960,7 +961,8 @@ snapshot[`Deno.inspect(Application) [auto] 2`] = `
960961
suspended: true,
961962
memorial: true,
962963
indexable: true,
963-
alias: URL "https://example.com/"
964+
alias: URL "https://example.com/",
965+
cat: true
964966
}'
965967
`;
966968

@@ -1013,7 +1015,8 @@ snapshot[`Deno.inspect(Application) [auto] 3`] = `
10131015
suspended: true,
10141016
memorial: true,
10151017
indexable: true,
1016-
aliases: [ Application {}, Application {} ]
1018+
aliases: [ Application {}, Application {} ],
1019+
cat: true
10171020
}'
10181021
`;
10191022

@@ -2647,7 +2650,8 @@ snapshot[`Deno.inspect(Group) [auto] 1`] = `
26472650
suspended: true,
26482651
memorial: true,
26492652
indexable: true,
2650-
aliases: [ Application {}, Group {}, Organization {}, Person {}, Service {} ]
2653+
aliases: [ Application {}, Group {}, Organization {}, Person {}, Service {} ],
2654+
cat: true
26512655
}'
26522656
`;
26532657

@@ -2700,7 +2704,8 @@ snapshot[`Deno.inspect(Group) [auto] 2`] = `
27002704
suspended: true,
27012705
memorial: true,
27022706
indexable: true,
2703-
alias: URL "https://example.com/"
2707+
alias: URL "https://example.com/",
2708+
cat: true
27042709
}'
27052710
`;
27062711

@@ -2753,7 +2758,8 @@ snapshot[`Deno.inspect(Group) [auto] 3`] = `
27532758
suspended: true,
27542759
memorial: true,
27552760
indexable: true,
2756-
aliases: [ Application {}, Application {} ]
2761+
aliases: [ Application {}, Application {} ],
2762+
cat: true
27572763
}'
27582764
`;
27592765

@@ -4669,7 +4675,8 @@ snapshot[`Deno.inspect(Organization) [auto] 1`] = `
46694675
suspended: true,
46704676
memorial: true,
46714677
indexable: true,
4672-
aliases: [ Application {}, Group {}, Organization {}, Person {}, Service {} ]
4678+
aliases: [ Application {}, Group {}, Organization {}, Person {}, Service {} ],
4679+
cat: true
46734680
}'
46744681
`;
46754682

@@ -4722,7 +4729,8 @@ snapshot[`Deno.inspect(Organization) [auto] 2`] = `
47224729
suspended: true,
47234730
memorial: true,
47244731
indexable: true,
4725-
alias: URL "https://example.com/"
4732+
alias: URL "https://example.com/",
4733+
cat: true
47264734
}'
47274735
`;
47284736

@@ -4775,7 +4783,8 @@ snapshot[`Deno.inspect(Organization) [auto] 3`] = `
47754783
suspended: true,
47764784
memorial: true,
47774785
indexable: true,
4778-
aliases: [ Application {}, Application {} ]
4786+
aliases: [ Application {}, Application {} ],
4787+
cat: true
47794788
}'
47804789
`;
47814790

@@ -4939,7 +4948,8 @@ snapshot[`Deno.inspect(Person) [auto] 1`] = `
49394948
suspended: true,
49404949
memorial: true,
49414950
indexable: true,
4942-
aliases: [ Application {}, Group {}, Organization {}, Person {}, Service {} ]
4951+
aliases: [ Application {}, Group {}, Organization {}, Person {}, Service {} ],
4952+
cat: true
49434953
}'
49444954
`;
49454955

@@ -4992,7 +5002,8 @@ snapshot[`Deno.inspect(Person) [auto] 2`] = `
49925002
suspended: true,
49935003
memorial: true,
49945004
indexable: true,
4995-
alias: URL "https://example.com/"
5005+
alias: URL "https://example.com/",
5006+
cat: true
49965007
}'
49975008
`;
49985009

@@ -5045,7 +5056,8 @@ snapshot[`Deno.inspect(Person) [auto] 3`] = `
50455056
suspended: true,
50465057
memorial: true,
50475058
indexable: true,
5048-
aliases: [ Application {}, Application {} ]
5059+
aliases: [ Application {}, Application {} ],
5060+
cat: true
50495061
}'
50505062
`;
50515063

@@ -5950,7 +5962,8 @@ snapshot[`Deno.inspect(Service) [auto] 1`] = `
59505962
suspended: true,
59515963
memorial: true,
59525964
indexable: true,
5953-
aliases: [ Application {}, Group {}, Organization {}, Person {}, Service {} ]
5965+
aliases: [ Application {}, Group {}, Organization {}, Person {}, Service {} ],
5966+
cat: true
59545967
}'
59555968
`;
59565969

@@ -6003,7 +6016,8 @@ snapshot[`Deno.inspect(Service) [auto] 2`] = `
60036016
suspended: true,
60046017
memorial: true,
60056018
indexable: true,
6006-
alias: URL "https://example.com/"
6019+
alias: URL "https://example.com/",
6020+
cat: true
60076021
}'
60086022
`;
60096023

@@ -6056,7 +6070,8 @@ snapshot[`Deno.inspect(Service) [auto] 3`] = `
60566070
suspended: true,
60576071
memorial: true,
60586072
indexable: true,
6059-
aliases: [ Application {}, Application {} ]
6073+
aliases: [ Application {}, Application {} ],
6074+
cat: true
60606075
}'
60616076
`;
60626077

src/vocab/application.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ defaultContext:
2626
schema: "http://schema.org#"
2727
PropertyValue: "schema:PropertyValue"
2828
value: "schema:value"
29+
misskey: "https://misskey-hub.net/ns#"
30+
isCat: "misskey:isCat"
2931

3032
properties:
3133
- pluralName: preferredUsernames
@@ -259,3 +261,15 @@ properties:
259261
- "https://www.w3.org/ns/activitystreams#Organization"
260262
- "https://www.w3.org/ns/activitystreams#Person"
261263
- "https://www.w3.org/ns/activitystreams#Service"
264+
265+
- singularName: cat
266+
functional: true
267+
compactName: isCat
268+
uri: "https://misskey-hub.net/ns#isCat"
269+
description: |
270+
Used on actors to indicate that they in some way identify as a cat,
271+
expressed as a boolean value. If this property is set to `true`,
272+
displaying the actor or their notes will have some special effects
273+
attached in some clients.
274+
range:
275+
- "http://www.w3.org/2001/XMLSchema#boolean"

src/vocab/group.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ defaultContext:
2626
schema: "http://schema.org#"
2727
PropertyValue: "schema:PropertyValue"
2828
value: "schema:value"
29+
misskey: "https://misskey-hub.net/ns#"
30+
isCat: "misskey:isCat"
2931

3032
properties:
3133
- pluralName: preferredUsernames
@@ -259,3 +261,15 @@ properties:
259261
- "https://www.w3.org/ns/activitystreams#Organization"
260262
- "https://www.w3.org/ns/activitystreams#Person"
261263
- "https://www.w3.org/ns/activitystreams#Service"
264+
265+
- singularName: cat
266+
functional: true
267+
compactName: isCat
268+
uri: "https://misskey-hub.net/ns#isCat"
269+
description: |
270+
Used on actors to indicate that they in some way identify as a cat,
271+
expressed as a boolean value. If this property is set to `true`,
272+
displaying the actor or their notes will have some special effects
273+
attached in some clients.
274+
range:
275+
- "http://www.w3.org/2001/XMLSchema#boolean"

src/vocab/organization.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ defaultContext:
2626
schema: "http://schema.org#"
2727
PropertyValue: "schema:PropertyValue"
2828
value: "schema:value"
29+
misskey: "https://misskey-hub.net/ns#"
30+
isCat: "misskey:isCat"
2931

3032
properties:
3133
- pluralName: preferredUsernames
@@ -259,3 +261,15 @@ properties:
259261
- "https://www.w3.org/ns/activitystreams#Organization"
260262
- "https://www.w3.org/ns/activitystreams#Person"
261263
- "https://www.w3.org/ns/activitystreams#Service"
264+
265+
- singularName: cat
266+
functional: true
267+
compactName: isCat
268+
uri: "https://misskey-hub.net/ns#isCat"
269+
description: |
270+
Used on actors to indicate that they in some way identify as a cat,
271+
expressed as a boolean value. If this property is set to `true`,
272+
displaying the actor or their notes will have some special effects
273+
attached in some clients.
274+
range:
275+
- "http://www.w3.org/2001/XMLSchema#boolean"

src/vocab/person.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ defaultContext:
2626
schema: "http://schema.org#"
2727
PropertyValue: "schema:PropertyValue"
2828
value: "schema:value"
29+
misskey: "https://misskey-hub.net/ns#"
30+
isCat: "misskey:isCat"
2931

3032
properties:
3133
- pluralName: preferredUsernames
@@ -259,3 +261,15 @@ properties:
259261
- "https://www.w3.org/ns/activitystreams#Organization"
260262
- "https://www.w3.org/ns/activitystreams#Person"
261263
- "https://www.w3.org/ns/activitystreams#Service"
264+
265+
- singularName: cat
266+
functional: true
267+
compactName: isCat
268+
uri: "https://misskey-hub.net/ns#isCat"
269+
description: |
270+
Used on actors to indicate that they in some way identify as a cat,
271+
expressed as a boolean value. If this property is set to `true`,
272+
displaying the actor or their notes will have some special effects
273+
attached in some clients.
274+
range:
275+
- "http://www.w3.org/2001/XMLSchema#boolean"

src/vocab/service.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ defaultContext:
2626
schema: "http://schema.org#"
2727
PropertyValue: "schema:PropertyValue"
2828
value: "schema:value"
29+
misskey: "https://misskey-hub.net/ns#"
30+
isCat: "misskey:isCat"
2931

3032
properties:
3133
- pluralName: preferredUsernames
@@ -259,3 +261,15 @@ properties:
259261
- "https://www.w3.org/ns/activitystreams#Organization"
260262
- "https://www.w3.org/ns/activitystreams#Person"
261263
- "https://www.w3.org/ns/activitystreams#Service"
264+
265+
- singularName: cat
266+
functional: true
267+
compactName: isCat
268+
uri: "https://misskey-hub.net/ns#isCat"
269+
description: |
270+
Used on actors to indicate that they in some way identify as a cat,
271+
expressed as a boolean value. If this property is set to `true`,
272+
displaying the actor or their notes will have some special effects
273+
attached in some clients.
274+
range:
275+
- "http://www.w3.org/2001/XMLSchema#boolean"

src/vocab/update.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,28 @@ defaultContext:
1515
- "https://w3id.org/security/data-integrity/v1"
1616
- "https://w3id.org/identity/v1"
1717
- toot: "http://joinmastodon.org/ns#"
18+
schema: "http://schema.org#"
1819
misskey: "https://misskey-hub.net/ns#"
1920
fedibird: "http://fedibird.com/ns#"
21+
PropertyValue: "schema:PropertyValue"
22+
value: "schema:value"
2023
sensitive: "as:sensitive"
2124
votersCount: "toot:votersCount"
25+
featured:
26+
"@id": "toot:featured"
27+
"@type": "@id"
28+
featuredTags:
29+
"@id": "toot:featuredTags"
30+
"@type": "@id"
31+
discoverable: "toot:discoverable"
32+
suspended: "toot:suspended"
33+
memorial: "toot:memorial"
34+
indexable: "toot:indexable"
2235
Emoji: "toot:Emoji"
2336
Hashtag: "as:Hashtag"
2437
ChatMessage: "http://litepub.social/ns#ChatMessage"
2538
quoteUrl: "as:quoteUrl"
2639
_misskey_quote: "misskey:_misskey_quote"
2740
quoteUri: "fedibird:quoteUri"
41+
isCat: "misskey:isCat"
2842
properties: []

0 commit comments

Comments
 (0)