Description
We are deprecating the MessagingService.clearSession command in the MessagingService plugin. This command is used to close the current active WebSocket connection and clears the conversation messages in Messenger.
We will also deprecate the corresponding event MessagingService.sessionCleared that is published by this command.
Change Category
API
Change Context
MessagingService.clearSession command is used to close the current active WebSocket connection and clears the conversation messages in Messenger, but this functionality is already taken care by MessagingService plugin automatically when it is needed and there is no need of this command, explicitly.
Although this command clears the current messages, it doesn't remove any browser storage data that is set by Messenger for tracking the session, as a result the conversation is still restored on page reload. It will be replaced by a proper valid command in future to support such capability.
Change Impact
Customers will need to stop using this command and its events.
In general, customers will not have to call this command as this functionality is taken care by MessagingService plugin automatically.
Date of Change
The command and its events will be marked as deprecated immediately. We will not remove the command and events from service until such time that customers no longer use them.
Impacted APIs
Messenger JavaScript SDK - Messaging Service plugin
- Command - MessagingService.clearSession
- Event - MessagingService.sessionCleared
References
[WEBMESS-945]