Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add way to determine if conversation disconnected #165

Closed
SketchingDev opened this issue Feb 9, 2024 · 2 comments
Closed

Add way to determine if conversation disconnected #165

SketchingDev opened this issue Feb 9, 2024 · 2 comments
Assignees

Comments

@SketchingDev
Copy link
Collaborator

Implement a way to determine if the conversation has been disconnected and cannot be continued.

Currently if the Conversation Disconnect configuration is set to 'Display conversation status and disconnect session' then the session is disconnected and any subsequent .sendText(...) results in the response:

{"type":"response","class":"string","code":409,"body":"Session is read-only, no new messages allowed"}

Update API to surface the Disconnect presence in the StructuredMessage sent from the bot:

{
  "type": "message",
  "class": "StructuredMessage",
  "code": 200,
  "body": {
    "type": "Event",
    "direction": "Outbound",
    "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "channel": {
      "time": "2024-02-09T22:39:50.526Z",
      "type": "Private",
      "from": {
        "nickname": "Robot Friend"
      },
      "to": {}
    },
    "events": [
      {
        "eventType": "Presence",
        "presence": {
          "type": "Disconnect"
        }
      }
    ],
    "metadata": {
      "readOnly": "true"
    },
    "originatingEntity": "Bot"
  }
}
@SketchingDev SketchingDev self-assigned this Feb 9, 2024
@SketchingDev
Copy link
Collaborator Author

#169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant