Edit and delete messages
Edit and delete messages in channels.
Read time 1 minuteLast updated 7 months ago
Vivox provides ways to edit and delete messages already sent to channels.
Edit channel messages
Vivox allows users to edit the text of messages they have sent into a channel using . channelName being the name of the channel that the message was sent to, the messageId being the id of the message to change, and newMessage being the updated text of the message.
VivoxService.Instance.EditChannelTextMessageAsync(string channelName, string messageId, string newMessage)When a message has been successfully edited by anyone in a channel, everyone in the channel will receive a Action containing the VivoxMessage that was edited, with the updated MessageText.
VivoxService.Instance.ChannelMessageEditedpublic async void UpdateChannelMessageAsync(VivoxMessage messageToUpdate, string updatedMessageText){ await VivoxService.Instance.EditChannelTextMessageAsync(messageToUpdate.ChannelName, messageToUpdate.MessageId, updatedMessageText);}
Delete channel messages
Vivox allows for users to delete messages they have sent into a channel using . channelName being the name of the channel that the message was sent to, and the messageId being the id of the message to delete.
VivoxService.Instance.DeleteChannelTextMessageAsync(string channelName, string messageId)When a message has been successfully deleted by anyone in a channel, everyone in the channel will receive a Action containing the VivoxMessage that was deleted.
VivoxService.Instance.ChannelMessageDeletedpublic async void DeleteChannelMessageAsync(VivoxMessage messageToDelete){ await VivoxService.Instance.DeleteChannelTextMessageAsync(messageToDelete.ChannelName, messageToDelete.MessageId)}