Skip to content

Commit

Permalink
Add ChatMessage context
Browse files Browse the repository at this point in the history
  • Loading branch information
symphony-jean-michael committed Aug 5, 2022
1 parent 4501ef2 commit d30e3e9
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
51 changes: 51 additions & 0 deletions docs/context/ref/ChatMessage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
id: ChatMessage
sidebar_label: ChatMessage
title: ChatMessage
hide_title: true
---
# `ChatMessage`

Message to send to a chat.

## Type

`fdc3.chat.message`

## Schema

- https://fdc3.finos.org/schemas/next/chatMessage.schema.json

## Details

| Property | Type | Required | Example Value |
|-------------|---------|----------|-------------------|
| `type` | string | Yes | `'fdc3.chat.message'` |
| `chatRoom` | ChatRoom | Yes | `{ type: 'fdc3.chat.room', providerName: 'Symphony', id:{ roomdId: 'j75xqXy25NBOdacUI3FNBH'} }` |
| `message` | [Message](https://fdc3.finos.org/schemas/next/message.schema.json) | Yes | `'A message to send'` |

## Example

```js
const chatMessage = {
type: "fdc3.chat.message",
chatRoom: {
type: 'fdc3.chat.room',
providerName: "Symphony",
id: {
roomId: "j75xqXy25NBOdacUI3FNBH"
}
},
message: "A message to send"
}
```

## See Also

Intents
- [StartChat](../../intents/ref/StartChat)
- [StartCall](../../intents/ref/StartCall)
- [SendChatMessage](../../intents/ref/SendChatMessage)

FINOS Financial Objects
- [Contact](https://fo.finos.org/docs/objects/contact)
13 changes: 13 additions & 0 deletions website/static/schemas/next/chatMessage.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://fdc3.finos.org/schemas/next/chatMessage.schema.json",
"type": "object",
"title": "ChatMessage",
"allOf": [{ "$ref": "context.schema.json#" }],
"properties": {
"type": { "const": "fdc3.chat.message" },
"chatRoom": { "$ref": "chatRoom.schema.json#" },
"message": { "$ref": "message.schema.json#" }
},
"required": ["type", "chatRoom", "message"]
}

0 comments on commit d30e3e9

Please sign in to comment.