Removes function clearWhiteboard that is not used anymore

This commit is contained in:
Gustavo Trott 2022-10-26 17:59:09 -03:00
parent 1bd9d57c84
commit d2d69dd7f9
3 changed files with 1 additions and 32 deletions

View File

@ -79,29 +79,6 @@ class WhiteboardModel extends SystemConfiguration {
wb.annotationsMap.values.toArray wb.annotationsMap.values.toArray
} }
def clearWhiteboard(wbId: String, userId: String): Option[Boolean] = {
val cleared: Option[Boolean] = None
/*if (hasWhiteboard(wbId)) {
val wb = getWhiteboard(wbId)
if (wb.multiUser.contains(userId)) {
if (wb.annotationsMap.contains(userId)) {
val newWb = wb.copy(annotationsMap = wb.annotationsMap - userId)
saveWhiteboard(newWb)
cleared = Some(false)
}
} else {
if (wb.annotationsMap.nonEmpty) {
val newWb = wb.copy(annotationsMap = new HashMap[String, Map[String, AnnotationVO]]())
saveWhiteboard(newWb)
cleared = Some(true)
}
}
}*/
cleared
}
def deleteAnnotations(wbId: String, userId: String, annotationsIds: Array[String], isPresenter: Boolean, isModerator: Boolean): Array[String] = { def deleteAnnotations(wbId: String, userId: String, annotationsIds: Array[String], isPresenter: Boolean, isModerator: Boolean): Array[String] = {
var annotationsIdsRemoved = Array[String]() var annotationsIdsRemoved = Array[String]()
val wb = getWhiteboard(wbId) val wb = getWhiteboard(wbId)

View File

@ -28,11 +28,7 @@ trait ClearWhiteboardPubMsgHdlr extends RightsManagementTrait {
PermissionCheck.ejectUserForFailedPermission(meetingId, msg.header.userId, reason, bus.outGW, liveMeeting) PermissionCheck.ejectUserForFailedPermission(meetingId, msg.header.userId, reason, bus.outGW, liveMeeting)
} }
} else { } else {
for { log.error("Ignoring message ClearWhiteboardPubMsg since this functions is not available in the new Whiteboard")
fullClear <- clearWhiteboard(msg.body.whiteboardId, msg.header.userId, liveMeeting)
} yield {
broadcastEvent(msg, fullClear)
}
} }
} }
} }

View File

@ -41,10 +41,6 @@ class WhiteboardApp2x(implicit val context: ActorContext)
liveMeeting.wbModel.getHistory(whiteboardId) liveMeeting.wbModel.getHistory(whiteboardId)
} }
def clearWhiteboard(whiteboardId: String, requesterId: String, liveMeeting: LiveMeeting): Option[Boolean] = {
liveMeeting.wbModel.clearWhiteboard(whiteboardId, requesterId)
}
def deleteWhiteboardAnnotations( def deleteWhiteboardAnnotations(
whiteboardId: String, whiteboardId: String,
requesterId: String, requesterId: String,