@fabriktor/fx 0.0.162 → 0.0.163
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/src/feed/feed.d.ts +0 -1
- package/dist/src/feed/feed.js +1 -7
- package/package.json +1 -1
package/dist/src/feed/feed.d.ts
CHANGED
package/dist/src/feed/feed.js
CHANGED
|
@@ -372,8 +372,7 @@ export class FeedFX {
|
|
|
372
372
|
const post_id = feedPostID(opts.post);
|
|
373
373
|
return await this.runAction(post_id, FeedAction.Reaction, async (signal) => {
|
|
374
374
|
const fresh = await this.requireFeedPost(post_id, signal);
|
|
375
|
-
|
|
376
|
-
if (id && !opts.replace_existing)
|
|
375
|
+
if (resolvedID(fresh.self.reaction_id))
|
|
377
376
|
throw errValidation({
|
|
378
377
|
msg: "An action already exists for this post.",
|
|
379
378
|
});
|
|
@@ -382,11 +381,6 @@ export class FeedFX {
|
|
|
382
381
|
field: "reaction_type",
|
|
383
382
|
msg: "Unsupported reaction.",
|
|
384
383
|
});
|
|
385
|
-
if (id) {
|
|
386
|
-
await this.feed.deleteOneFeedReaction({ signal, id });
|
|
387
|
-
signal.throwIfAborted();
|
|
388
|
-
this.markActionRemoved(post_id, FeedAction.Reaction);
|
|
389
|
-
}
|
|
390
384
|
const out = await this.feed.insertOneFeedReaction({
|
|
391
385
|
signal,
|
|
392
386
|
in: {
|