The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/client/views/admin/integrations/exampleIncomingData.js

21 lines
597 B

import { useMemo } from 'react';
export function useExampleData({ additionalFields, url }) {
return useMemo(() => {
const exampleData = {
...additionalFields,
text: 'Example message',
attachments: [
{
title: 'Rocket.Chat',
title_link: 'https://rocket.chat',
text: 'Rocket.Chat, the best open source chat',
image_url: '/images/integration-attachment-example.png',
color: '#764FA5',
},
],
};
return [exampleData, `curl -X POST -H 'Content-Type: application/json' --data '${JSON.stringify(exampleData)}' ${url}`];
}, [additionalFields, url]);
}