@singi-labs/sifa-sdk 0.12.17 → 0.12.19
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 +11 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3278,6 +3278,13 @@ function withGeneric(vm) {
|
|
|
3278
3278
|
vm.body = { kind: "generic" };
|
|
3279
3279
|
return vm;
|
|
3280
3280
|
}
|
|
3281
|
+
function applyFediversePost(vm, record) {
|
|
3282
|
+
const url = httpUrl(record.url);
|
|
3283
|
+
if (url) vm.sourceUrl = url;
|
|
3284
|
+
const text = asNonEmptyString(record.excerpt);
|
|
3285
|
+
vm.body = text ? { kind: "text", text } : { kind: "generic" };
|
|
3286
|
+
return vm;
|
|
3287
|
+
}
|
|
3281
3288
|
function applyGithubPr(vm, record) {
|
|
3282
3289
|
const body = {
|
|
3283
3290
|
kind: "github-pr",
|
|
@@ -3519,6 +3526,7 @@ var GENERIC_TEXT_ORDER = [
|
|
|
3519
3526
|
"name",
|
|
3520
3527
|
"description",
|
|
3521
3528
|
"content",
|
|
3529
|
+
"excerpt",
|
|
3522
3530
|
"body",
|
|
3523
3531
|
"message",
|
|
3524
3532
|
"note",
|
|
@@ -3732,6 +3740,8 @@ function toStreamCardVM(item, options = {}) {
|
|
|
3732
3740
|
return record ? applyYouAndMe(vm, record) : withGeneric(vm);
|
|
3733
3741
|
case "fyi.asq.answer":
|
|
3734
3742
|
return record ? applyAsqAnswer(vm, record) : withGeneric(vm);
|
|
3743
|
+
case "fediverse.post":
|
|
3744
|
+
return record ? applyFediversePost(vm, record) : withGeneric(vm);
|
|
3735
3745
|
}
|
|
3736
3746
|
if (record && item.collection.startsWith("social.popfeed.feed.")) {
|
|
3737
3747
|
return applyMediaReview(vm, item, record);
|
|
@@ -4565,7 +4575,7 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
|
|
|
4565
4575
|
});
|
|
4566
4576
|
|
|
4567
4577
|
// src/index.ts
|
|
4568
|
-
var SIFA_SDK_VERSION = "0.12.
|
|
4578
|
+
var SIFA_SDK_VERSION = "0.12.19";
|
|
4569
4579
|
|
|
4570
4580
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
4571
4581
|
exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
|