@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.
@@ -84,7 +84,6 @@ export type StartFeedSessionOptions = FeedPullContext & {
84
84
  export type AddFeedReactionOptions = {
85
85
  post: FeedPost;
86
86
  reaction_type: FeedReactionType;
87
- replace_existing?: boolean;
88
87
  };
89
88
  export type RemoveFeedReactionOptions = {
90
89
  post: FeedPost;
@@ -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
- const id = resolvedID(fresh.self.reaction_id);
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: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fabriktor/fx",
3
- "version": "0.0.162",
3
+ "version": "0.0.163",
4
4
  "description": "![Fabriktor Logo](./img/fabriktor-character.gif)",
5
5
  "type": "module",
6
6
  "exports": {