Unverified Commit 4310cf04 authored by Hong Minhee's avatar Hong Minhee
Browse files

Warn if actor has no liked property

parent 558eb733
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -625,6 +625,24 @@ export class Federation<TContextData> {
            );
          }
        }
        if (
          this.#likedCallbacks != null &&
          this.#likedCallbacks.dispatcher != null
        ) {
          if (actor?.likedId == null) {
            logger.warn(
              "You configured a liked collection dispatcher, but the " +
                "actor does not have a liked property.  Set the property " +
                "with Context.getLikedUri(handle).",
            );
          } else if (actor.likedId.href != context.getLikedUri(handle).href) {
            logger.warn(
              "You configured a liked collection dispatcher, but the " +
                "actor's liked property does not match the liked collection " +
                "URI.  Set the property with Context.getLikedUri(handle).",
            );
          }
        }
        if (this.#router.has("inbox")) {
          if (actor.inboxId == null) {
            logger.warn(