ChatService
Conversations and read state.
On this page
Conversations and read state. Messages themselves flow over the realtime WebSocket; this is the inbox. Every method is a POST with a JSON body; see the overview for the protocol, authentication and errors.
Summary#
| Method | Auth | Description |
|---|---|---|
| ListConversations | Account | |
| MarkRead | Account |
Methods#
ListConversations#
HTTP
POST /neo.platform.v1.ChatService/ListConversations
Content-Type: application/jsonAuth: A signed-in account. Guests are refused.
Request: ListConversationsRequest. Response: ListConversationsResponse.
MarkRead#
HTTP
POST /neo.platform.v1.ChatService/MarkRead
Content-Type: application/jsonAuth: A signed-in account. Guests are refused.
Request: MarkReadRequest. Response: MarkReadResponse.
Types#
Conversation#
| Field | Type | Description |
|---|---|---|
channel | string | The channel as the caller names it: dm:<userId>, group:<id> or session:<id>. |
title | string | |
withUser | UserSummary | For DMs: the other person. |
lastMessage | string | |
lastSender | UserSummary | |
lastAt | string | |
unread | string (int64) | |
lastMessageId | string |
ListConversationsRequest#
| Field | Type | Description |
|---|---|---|
limit | number |
ListConversationsResponse#
| Field | Type | Description |
|---|---|---|
conversations | array of Conversation |
MarkReadRequest#
| Field | Type | Description |
|---|---|---|
channel | string | |
messageId | string | Everything up to and including this message is read. |
MarkReadResponse#
| Field | Type | Description |
|---|---|---|
unreadTotal | string (int64) |