Skip to content

Instantly share code, notes, and snippets.

@javabrett
Created August 4, 2018 13:11
Show Gist options
  • Save javabrett/a645bc5d09ce1a3992e78932c63848f7 to your computer and use it in GitHub Desktop.
Save javabrett/a645bc5d09ce1a3992e78932c63848f7 to your computer and use it in GitHub Desktop.
---
Get a single conversation from id.
The state field in conversation payload may take one of the following status
- **normalState** : Default state for conversation
- **waitForFirstMessage** : Message count equals 0
- **waitingForPermission** : Message count equals 1 and current user created conversation
- **receivedInvitation** : Message count equals 1 and current user DID NOT created conversation
- **iAmBlocking** : Message count superior to 1 and current user blocked conversation
- **iAmBlocked** : Message count superior to 1 and conversation other user blocked conversation
- **weAreBothBlocked** : Message count superior to 1 and both users blocked conversation
---
tags:
- Chat / Conversations
security:
- APIKeyQueryParam: []
- APIKeyHeader: []
parameters:
- name: conversation_id
in: path
required: true
schema:
type: integer
description: The convesation to fetch.
responses:
404:
description: Conversation not found in database.
schema:
$ref: '#/definitions/NotFound'
200:
description: Return convesation dumped object.
schema:
$ref: '#/definitions/Conversation'
401:
description: Not authorized, user must be logged to perform query
schema:
$ref: '#/definitions/Unauthorized'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment