Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
export class MessageInputEncrypted extends PureComponent {
sendMessageEncrypted = async data => {
const encryptedText = await this.props.virgil.eThree.encrypt(
data.text,
this.props.virgil.publicKeys
);
await this.props.channel.sendMessage({
...data,
text: encryptedText
});
};
render = () => {
const newProps = {
...this.props,
sendMessage: this.sendMessageEncrypted
};
return <MessageInput {...newProps} />;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.