Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannick-Malins committed Nov 10, 2023
1 parent 3f43819 commit 8ef2f0a
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 4 deletions.
16 changes: 15 additions & 1 deletion website/static/schemas/2.1/context/chatMessage.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,20 @@
"streamId": "j75xqXy25NBOdacUI3FNBH"
}
},
"message": "A message to send"
"message": {
"type": "fdc3.message",
"text": {
"text/plain": "Hey all, can we discuss the issue together? I attached a screenshot"
},
"entities": {
"0": {
"type": "fdc3.fileAttachment",
"data": {
"name": "myImage.png",
"dataUri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII"
}
}
}
}
}]
}
16 changes: 15 additions & 1 deletion website/static/schemas/next/context/chatMessage.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,20 @@
"streamId": "j75xqXy25NBOdacUI3FNBH"
}
},
"message": "A message to send"
"message": {
"type": "fdc3.message",
"text": {
"text/plain": "Hey all, can we discuss the issue together? I attached a screenshot"
},
"entities": {
"0": {
"type": "fdc3.fileAttachment",
"data": {
"name": "myImage.png",
"dataUri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII"
}
}
}
}
}]
}
16 changes: 15 additions & 1 deletion website/versioned_docs/version-2.1/context/ref/ChatMessage.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,21 @@ const chatMessage = {
streamId: "j75xqXy25NBOdacUI3FNBH"
}
},
message: "A message to send"
message: {
type: 'fdc3.message',
text: {
'text/plain': 'Hey all, can we discuss the issue together? I attached a screenshot'
},
entities: {
'0': {
type: 'fdc3.fileAttachment',
data: {
name: 'myImage.png',
dataUri: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII'
}
}
}
}
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,21 @@ const chatRoom = intentResolution.getResult();
let chatMessage: ChatMessage = {
type: "fdc3.chat.message",
chatRoom,
message: "Another message to send in the room"
message: {
type: 'fdc3.message',
text: {
'text/plain': 'Hey all, can we discuss the issue together? I attached a screenshot'
},
entities: {
'0': {
type: 'fdc3.fileAttachment',
data: {
name: 'myImage.png',
dataUri: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII'
}
}
}
}
}

await fdc3.raiseIntent("SendChatMessage", context, intentResolution.source);
Expand Down

0 comments on commit 8ef2f0a

Please sign in to comment.