Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const onBeforeUpdateUserMessage = (text) => {
updateChannelParams();
const userMessageParams = new sdk.UserMessageParams();
var jsonMessageData = {
type: "VOTING_APP",
version: 1,
title: `${text}`,
};
var jsonString = JSON.stringify(jsonMessageData);
userMessageParams.data = jsonString;
userMessageParams.customType = "VOTING_APP";
userMessageParams.message = text;
return userMessageParams;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment