@singi-labs/sifa-sdk 0.19.19 → 0.19.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -4564,8 +4564,7 @@ function recordHasSubjectRef(record) {
4564
4564
  return false;
4565
4565
  }
4566
4566
  function resolveSourceUrl(item, record) {
4567
- const authorDid = didFromUri(item.uri);
4568
- if (!authorDid) return void 0;
4567
+ const authorDid = didFromUri(item.uri) ?? "";
4569
4568
  const authorHandle = asNonEmptyString(item.authorHandle) ?? asNonEmptyString(record.handle);
4570
4569
  const url = resolveCardUrl({
4571
4570
  collection: item.collection,
@@ -5004,6 +5003,15 @@ function genericSubject(record) {
5004
5003
  return void 0;
5005
5004
  }
5006
5005
  function withResolvedSubjectMeta(subject, item) {
5006
+ if (subject.kind === "person") {
5007
+ const handle = nonBlankString(item.subjectHandle) ?? subject.handle;
5008
+ const displayName = nonBlankString(item.subjectDisplayName) ?? subject.displayName;
5009
+ return {
5010
+ ...subject,
5011
+ ...handle ? { handle } : {},
5012
+ ...displayName ? { displayName } : {}
5013
+ };
5014
+ }
5007
5015
  if (subject.kind !== "record") return subject;
5008
5016
  const title = nonBlankString(item.subjectTitle) ?? subject.title;
5009
5017
  const url = nonBlankString(item.subjectUrl);
@@ -6601,7 +6609,7 @@ function describeSifaRecord(collection, value) {
6601
6609
  }
6602
6610
 
6603
6611
  // src/index.ts
6604
- var SIFA_SDK_VERSION = "0.19.19";
6612
+ var SIFA_SDK_VERSION = "0.19.21";
6605
6613
 
6606
6614
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
6607
6615
  exports.ACTIVITY_VERBS = ACTIVITY_VERBS;