@product7/feedback-sdk 1.3.5 → 1.3.6

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.
@@ -5883,18 +5883,21 @@
5883
5883
  if (response.status) {
5884
5884
  console.log('[MessengerWidget] Contact identified:', response.data.contact_id);
5885
5885
 
5886
- // Update state
5887
5886
  if (!this.messengerState.userContext) {
5888
5887
  this.messengerState.userContext = {};
5889
5888
  }
5890
5889
  this.messengerState.userContext.name = contactData.name;
5891
5890
  this.messengerState.userContext.email = contactData.email;
5892
- this.messengerState.isIdentified = true; // ADD THIS LINE
5891
+ this.messengerState.isIdentified = true;
5893
5892
 
5894
- // Process pending message
5895
5893
  const pendingMessage = this.messengerState.pendingMessage;
5896
5894
  if (pendingMessage) {
5897
5895
  this.messengerState.pendingMessage = null;
5896
+
5897
+ // SET VIEW FIRST
5898
+ this.messengerState.setView('chat');
5899
+
5900
+ // THEN start conversation
5898
5901
  await this.startNewConversation(
5899
5902
  pendingMessage.content,
5900
5903
  '',
@@ -5911,7 +5914,6 @@
5911
5914
  throw error;
5912
5915
  }
5913
5916
  }
5914
-
5915
5917
  async _handleUploadFile(base64Data, filename) {
5916
5918
  try {
5917
5919
  const response = await this.apiService.uploadFile(base64Data, filename);