|
@@ -712,23 +712,28 @@ public class RoomServiceImpl implements RoomService {
|
|
|
RTCRoomPluginService pluginService = rtcRoomPluginContext.getPluginService(rtcServiceProvider);
|
|
|
if (rtcServiceProvider.equals(TencentCloudRTCPlugin.PLUGIN_NAME)) {
|
|
|
// 腾讯云RTC服务
|
|
|
- RTCRoomMessage.MessageContent.MessageContentBuilder action = RTCRoomMessage.MessageContent.builder()
|
|
|
- .action(EMemberAction.LEAVE.getValue());
|
|
|
+ RTCRoomMessage.MessageContent.MessageContentBuilder messageContentBuilder = RTCRoomMessage.MessageContent
|
|
|
+ .builder()
|
|
|
+ .action(EMemberAction.LEAVE.getValue())
|
|
|
+ .handUpOn(false)
|
|
|
+ .timestamp(System.currentTimeMillis())
|
|
|
+ .microphone(false)
|
|
|
+ .camera(false)
|
|
|
+ .sendUserInfo(getSendUser(userId,roleEnum));
|
|
|
|
|
|
if (roleEnum == RoleTeacher) {
|
|
|
- action.role(EMemberRole.TEACHER.getValue());
|
|
|
+ messageContentBuilder.role(EMemberRole.TEACHER.getValue());
|
|
|
} else {
|
|
|
- action.role(EMemberRole.STUDENT.getValue());
|
|
|
+ messageContentBuilder.role(EMemberRole.STUDENT.getValue());
|
|
|
}
|
|
|
- action.handUpOn(false)
|
|
|
- .timestamp(System.currentTimeMillis())
|
|
|
- .microphone(false)
|
|
|
- .camera(false).sendUserInfo(getSendUser(userId,roleEnum));
|
|
|
-
|
|
|
|
|
|
RTCRoomMessage roomMessage = RTCRoomMessage.builder()
|
|
|
.objectName(RTCRoomMessage.MEMBER_CHANGE_MESSAGE)
|
|
|
- .content(action.build())
|
|
|
+ .toChatRoomId(roomId)
|
|
|
+ .content(messageContentBuilder.build())
|
|
|
+ .fromUserId(userId)
|
|
|
+ .isPersisted(1)
|
|
|
+ .isIncludeSender(1)
|
|
|
.build();
|
|
|
|
|
|
pluginService.sendChatRoomMessage(roomMessage);
|