Custom Message

With a custom message, you can customize the data you want to include as part of the message.

import { MessageRepository, MessageType } from '@amityco/js-sdk';

const messageLiveObject = MessageRepository.createMessage({
  channelId: 'channel1',
  type: MessageType.Custom,
  data: {
    customField1: 'customValue1',
    customField2: 'customValue2',
  }
  tags: ['tag1', 'tag2'],
  mentionees: [{type: 'user', userIds: ['user1', 'user2']}],
});

Last updated