Unverified Commit 109c993d authored by Hong Minhee's avatar Hong Minhee
Browse files

Rename Object's attributedTo prop to attribution

parent dd91fc6d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@
    "editor.defaultFormatter": "denoland.vscode-deno",
    "editor.formatOnSave": true,
    "editor.codeActionsOnSave": {
      "source.sortImports": true
      "source.sortImports": "always"
    }
  },
  "cSpell.words": [
+42 −12
Original line number Diff line number Diff line
@@ -53,31 +53,61 @@ To be released.
     -  `Object.clone()` method's `images` option no more accepts `Link`
        objects.

 -  `Object`'s `attributedTo` property now accepts only `Actor` objects.

     -  `new Object()` constructor's `attributedTo` option now accepts only
        `Actor` objects.
     -  `Object.getAttributedTo()` method now returns only an `Actor` object.
     -  `Object.getAttributedTos()` method now returns only `Actor` objects.
     -  `Object.clone()` method's `attributedTo` option now accepts only
 -  `Object`'s `attributedTo` property was renamed to `attribution`.

    -  `new Object()` constructor's `attributedTo` option was renamed to
       `attribution`.
    -  `new Object()` constructor's `attributedTos` option was renamed to
       `attributions`.
    -  `Object.getAttributedTo()` method is renamed to
       `Object.getAttribution()`.
    -  `Object.getAttributedTos()` method is renamed to
       `Object.getAttributions()`.
    -  `Object.clone()` method's `attributedTo` option is renamed to
       `attribution`.
    -  `Object.clone()` method's `attributedTos` option is renamed to
       `attributions`.

 -  `Object`'s `attribution` property (was `attributedTo`) now accepts only
    `Actor` objects.

     -  `new Object()` constructor's `attribution` option (was `attributedTo`)
        now accepts only an `Actor` object.
     -  `new Object()` constructor's `attributions` option (was `attributedTos`)
        now accepts only `Actor` objects.
     -  `Object.getAttribution()` method (was `getAttributedTo()`) now returns
        only an `Actor` object.
     -  `Object.getAttributions()` method (was `getAttributedTos()`) now returns
        only `Actor` objects.
     -  `Object.clone()` method's `attribution` option (`attributedTo`) now
        accepts only an `Actor` object.
     -  `Object.clone()` method's `attributions` option (`attributedTos`) now
        accepts only `Actor` objects.

 -  `Activity`'s `object` property no more accepts `Link` objects.

     -  `new Activity()` constructor's `object` option no more accepts `Link`
     -  `new Activity()` constructor's `object` option no more accepts a `Link`
        object.
     -  `new Activity()` constructor's `objects` option no more accepts `Link`
        objects.
     -  `Activity.getObject()` method no more returns a `Link` object.
     -  `Activity.getObjects()` method no more returns `Link` objects.
     -  `Activity.clone()` method's `object` option no more accepts `Link`
     -  `Activity.clone()` method's `object` option no more accepts a `Link`
        object.
     -  `Activity.clone()` method's `objects` option no more accepts `Link`
        objects.

 -  `Activity`'s `actor` property now accepts only `Actor` objects.

     -  `new Activity()` constructor's `actor` option now accepts only `Actor`
     -  `new Activity()` constructor's `actor` option now accepts only
        an `Actor` object.
     -  `new Activity()` constructor's `actors` option now accepts only `Actor`
        objects.
     -  `Activity.getActor()` method now returns only an `Actor` object.
     -  `Activity.getActors()` method now returns only `Actor` objects.
     -  `Activity.clone()` method's `actor` option now accepts only `Actor`
     -  `Activity.clone()` method's `actor` option now accepts only an `Actor`
        object.
     -  `Activity.clone()` method's `actors` option now accepts only `Actor`
        objects.

 -  Added `sensitive` property to `Object` class.
+180 −180

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -176,7 +176,7 @@ federation.setInboxListeners("/users/{handle}/inbox", "/inbox")
    const object = await create.getObject(ctx);
    if (object instanceof Note) {
      if (object.id == null || object.content == null) return;
      const author = await object.getAttributedTo();
      const author = await object.getAttribution();
      if (
        author == null || author.id == null || author.preferredUsername == null
      ) return;
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ export function toArticle(
  const url = new URL(`/posts/${post.uuid}`, context.url);
  return new Article({
    id: url,
    attributedTo: context.getActorUri(blog.handle),
    attribution: context.getActorUri(blog.handle),
    to: new URL("https://www.w3.org/ns/activitystreams#Public"),
    summary: post.title,
    content: getContentHtml(post),
Loading