Closed Omsad closed 4 years ago
I've created a pull request #66 to fix the above.
Your PR to fix that and other issues was merged and a new prerelease version containing it, is already available on nuget.
Thanks again and sorry that you had to wait :)
Hi,
You're currently treating any redemption that isn't "custom-reward-created", "custom-reward-updated" or "custom-reward-deleted" as a "reward-redeemed" message as the CommunityPointsChannelType enumeration will default to 0, e.g. RewardRedeemed.
This looks to be working for a "redemption-status-update" message, e.g. when an individual redemption is accepted or rejected, as it's looks identical apart from the fact that the status is "ACTION_TAKEN" rather than "UNFULFILLED".
This isn't working for an "update-redemption-statuses-progress" message, e.g. when multiple redemptions are accepted or rejected, as that wont parse into a "reward-redeemed" message.
JSON for redemption-status-update Accept or Reject
JSON for update-redemption-statuses-progress Accept or Reject
As the redemption-status-update message doesn't help in anyway at the moment and update-redemption-statuses-progress message causes PubSub service to throw an exception I have changed my local copy of the code to:
This will then cause the messages to be ignored.
I would like to update the code so that a "redemption-status-update" message would raise the same event as an "reward-redeemed" message but with a correct status, is there anyway of figuring out the status from the json provided?
Also is it true that an "update-redemption-statuses-progress" message could accept or reject all messages sent previous before or on the timestamp, e.g. is there any additional logic which I would need to implement to make sure I'm not rejecting anything which has already been accepted or vice versa?