Skip to content

Commit

Permalink
Only check legalHoldStatus if it is set
Browse files Browse the repository at this point in the history
  • Loading branch information
mythsunwind committed Jul 25, 2024
1 parent 8721262 commit 60132e5
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,12 @@ sealed class ConversationRepository {
instance.coreLogic.sessionScope(session.accountInfo.userId) {
if (text != null) {
setMessageTimer(instance, conversationId, messageTimer)
if (legalHoldStatus != null && legalHoldStatus == 2) {
log.info("Instance ${instance.instanceId}: Approve legal hold request and don't block sending")
approveLegalHoldRequest(instance.password)
conversations.setNotifiedAboutConversationUnderLegalHold(conversationId)
legalHoldStatus.let {
if (legalHoldStatus == 2) {
log.info("Instance ${instance.instanceId}: Approve legal hold request and don't block sending")
approveLegalHoldRequest(instance.password)
conversations.setNotifiedAboutConversationUnderLegalHold(conversationId)
}
}
log.info("Instance ${instance.instanceId}: Send text message '$text'")
val result = if (buttons.isEmpty()) {
Expand Down

0 comments on commit 60132e5

Please sign in to comment.