编辑和删除消息
Edit and delete messages in channels.
阅读时间1 分钟最后更新于 7 个月前
Vivox 提供了编辑和删除已发送到频道的消息的方法。
编辑频道消息
Vivox 允许用户使用 编辑他们发送到频道的消息文本,其中 channelName 是消息发送到的频道的名称,messageId 是要更改的消息的 ID,newMessage 是更新的消息文本。
VivoxService.Instance.EditChannelTextMessageAsync(string channelName, string messageId, string newMessage)当频道中的任何人成功编辑消息后,频道中的所有人都将收到一个 操作,其中包含已编辑的 VivoxMessage 以及更新的 MessageText。
VivoxService.Instance.ChannelMessageEditedpublic async void UpdateChannelMessageAsync(VivoxMessage messageToUpdate, string updatedMessageText){ await VivoxService.Instance.EditChannelTextMessageAsync(messageToUpdate.ChannelName, messageToUpdate.MessageId, updatedMessageText);}
删除频道消息
Vivox 允许用户使用 删除他们发送到频道的消息,其中 channelName 是消息发送到的频道的名称,messageId 是要删除的消息的 ID。
VivoxService.Instance.DeleteChannelTextMessageAsync(string channelName, string messageId)当频道中的任何人成功删除消息后,频道中的所有人都将收到一个 操作,其中包含已删除的 VivoxMessage。
VivoxService.Instance.ChannelMessageDeletedpublic async void DeleteChannelMessageAsync(VivoxMessage messageToDelete){ await VivoxService.Instance.DeleteChannelTextMessageAsync(messageToDelete.ChannelName, messageToDelete.MessageId)}