Skip to content

Instantly share code, notes, and snippets.

@warodri-sendbird
Created October 6, 2021 08:01
Show Gist options
  • Save warodri-sendbird/6747e2828741e505a84f2975130b75c0 to your computer and use it in GitHub Desktop.
Save warodri-sendbird/6747e2828741e505a84f2975130b75c0 to your computer and use it in GitHub Desktop.
// Create a `FileMessageParams` object.
const params = new sb.FileMessageParams();
params.file = FILE;
params.parentMessageId = PARENT_MESSAGE_ID; // This specifies the unique ID of a parent message which has a thread of replies. If the message sent through the `sendUserMessage()` method is a parent message, the value of this property is 0.
...
// Pass the params to the parameter in the `sendFileMessage()` method.
groupChannel.sendFileMessage(params, (message, error) => {
if (error) {
// Handle error.
}
// A reply to a specific message in the form of a file message is successfully sent.
...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment