Skip to content

Commit

Permalink
Update App.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jpeng-ms committed Jun 6, 2024
1 parent 318c119 commit 7599d3c
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ export default function App() {
case 'removeParticipant':
await removeParticipant(values);
break;
case 'getChatThreadProperties':
await getChatThreadProperties();
case 'renderLastMessage':
await renderLastMessage(values);
break;
Expand Down Expand Up @@ -186,6 +188,18 @@ const policy = {
}
}

const getChatThreadProperties = async () => {
setStatus("get chat thread properties requested")
try {
let getChatThreadPropertiesResult = await window.chatThreadClient.getProperties();
setStatus("get chat thread properties done")
setFormValues(getChatThreadPropertiesResult)
} catch (err) {
setStatus("get chat thread properties failed")
setFormValues(err)
}
}

const sendtyping = async(value) => {
setStatus("send typing event requested")
try {
Expand Down Expand Up @@ -486,6 +500,7 @@ const policy = {
{ label: 'Stop notification', value: 'stopnotification' },
{ label: 'Event Control', value: 'eventControl' },
{ label: 'Render Last Message', value: 'renderLastMessage' },
{ label: 'Get Chat Thread Properties', value: 'getChatThreadProperties' },
],
},
{
Expand Down Expand Up @@ -552,7 +567,8 @@ const policy = {
{ label: 'Event Control', value: 'eventControl' },
{ label: 'Add an user', value: 'addParticipant' },
{ label: 'Remove an user', value: 'removeParticipant' },
{ label: 'Render Last Message', value: 'renderLastMessage' }
{ label: 'Render Last Message', value: 'renderLastMessage' },
{ label: 'Get Chat Thread Properties', value: 'getChatThreadProperties' },
],
},
{
Expand Down

0 comments on commit 7599d3c

Please sign in to comment.