@singi-labs/sifa-sdk 0.12.18 → 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 +10 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -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",
|
|
@@ -3733,6 +3740,8 @@ function toStreamCardVM(item, options = {}) {
|
|
|
3733
3740
|
return record ? applyYouAndMe(vm, record) : withGeneric(vm);
|
|
3734
3741
|
case "fyi.asq.answer":
|
|
3735
3742
|
return record ? applyAsqAnswer(vm, record) : withGeneric(vm);
|
|
3743
|
+
case "fediverse.post":
|
|
3744
|
+
return record ? applyFediversePost(vm, record) : withGeneric(vm);
|
|
3736
3745
|
}
|
|
3737
3746
|
if (record && item.collection.startsWith("social.popfeed.feed.")) {
|
|
3738
3747
|
return applyMediaReview(vm, item, record);
|
|
@@ -4566,7 +4575,7 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
|
|
|
4566
4575
|
});
|
|
4567
4576
|
|
|
4568
4577
|
// src/index.ts
|
|
4569
|
-
var SIFA_SDK_VERSION = "0.12.
|
|
4578
|
+
var SIFA_SDK_VERSION = "0.12.19";
|
|
4570
4579
|
|
|
4571
4580
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
4572
4581
|
exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
|