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/app/integrations/client/views/messageExample.js

40 lines
789 B

import { Template } from 'meteor/templating';
import { Random } from 'meteor/random';
export const exampleMsg = () => {
const record = Template.instance().record.get();
return {
_id: Random.id(),
alias: record.alias,
emoji: record.emoji,
avatar: record.avatar,
msg: 'Example message',
bot: {
i: Random.id(),
},
groupable: false,
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',
}],
ts: new Date(),
u: {
_id: Random.id(),
username: record.username,
},
};
};
export const exampleUser = () => ({
u: {
_id: Random.id(),
},
});
export const exampleSettings = () => ({
settings: {},
});