/user/recordMessage

Records a message sent by the user. Has 3 main requirements:

  1. groupId

  2. senderUserId

  3. text

const { data, error } = await backend.post('/user/recordMessage', {
      groupId: '<GROUP ID>',
      senderUserId: '<USER ID>',
      text: 'Heyy!! What is the best dish?',
}).then(res => res?.data).catch(error => error.response.data);

Returns the recorded message with messageId, groupId, senderUserId, text, and date of storage.

Last updated