Skip to content

fix(Message): map missing scheduled event data and isViewOnce property#201724

Open
palpavasiya wants to merge 1 commit intowwebjs:mainfrom
palpavasiya:fix/message-properties-and-types
Open

fix(Message): map missing scheduled event data and isViewOnce property#201724
palpavasiya wants to merge 1 commit intowwebjs:mainfrom
palpavasiya:fix/message-properties-and-types

Conversation

@palpavasiya
Copy link
Copy Markdown

@palpavasiya palpavasiya commented Apr 19, 2026

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 Message class in src/structures/Message.js.

Description of changes

  • Scheduled Event Data: Previously, messages of type SCHEDULED_EVENT_CREATION were 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).
  • View Once Media: The isViewOnce property was never mapped from the raw message data, making view-once detection unreliable. Added property mapping from data.isViewOnce.

Related Issues

--

Checklist

  • I have tested these changes locally.
  • npm run check passes with no ESLint or Prettier errors.
  • My commit messages and PR title follow the conventional commit format.

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
@github-actions github-actions Bot added the api changes API modifications label Apr 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api changes API modifications

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant