fix(Message): map missing scheduled event data and isViewOnce property#201724
Open
palpavasiya wants to merge 1 commit intowwebjs:mainfrom
Open
fix(Message): map missing scheduled event data and isViewOnce property#201724palpavasiya wants to merge 1 commit intowwebjs:mainfrom
palpavasiya wants to merge 1 commit intowwebjs:mainfrom
Conversation
Previously, messages of type SCHEDULED_EVENT_CREATION were received without any of their event fields populated at runtime. The isViewOnce property was also never mapped, making view-once detection unreliable. - Map isViewOnce from data.isViewOnce for all incoming messages - Map all 7 event fields inside a SCHEDULED_EVENT_CREATION guard: eventName, eventStartTime, eventEndTime, eventDescription, eventLocation, eventJoinLink, isEventCanceled
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR fixes issues where critical properties were missing from incoming messages at runtime because they were not being mapped internally by the
Messageclass insrc/structures/Message.js.Description of changes
SCHEDULED_EVENT_CREATIONwere received without any of their event fields populated at runtime, making it impossible to read incoming scheduled events. Added a conditional block to map all 7 event fields (eventName,eventStartTime,eventEndTime,eventDescription,eventLocation,eventJoinLink,isEventCanceled).isViewOnceproperty was never mapped from the raw message data, making view-once detection unreliable. Added property mapping fromdata.isViewOnce.Related Issues
--
Checklist
npm run checkpasses with no ESLint or Prettier errors.