update modules/service: mod 4 files

This commit is contained in:
jack ning
2025-03-17 14:24:08 +08:00
parent 944b64ead6
commit e35ca20d5d
2 changed files with 30 additions and 2 deletions

View File

@@ -2,7 +2,7 @@
* @Author: jackning 270580156@qq.com
* @Date: 2024-01-29 16:21:24
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2025-03-17 12:57:03
* @LastEditTime: 2025-03-17 14:11:17
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
* Please be aware of the BSL license restrictions before installing Bytedesk IM
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
@@ -95,6 +95,28 @@ public class ThreadEntity extends AbstractThreadEntity {
return getState().equals(ThreadStateEnum.TRANSFER_CANCELED.name());
}
// is invite pending
public Boolean isInvitePending() {
return getState().equals(ThreadStateEnum.INVITE_PENDING.name());
}
// is invite accepted
public Boolean isInviteAccepted() {
return getState().equals(ThreadStateEnum.INVITE_ACCEPTED.name());
}
public Boolean isInviteRejected() {
return getState().equals(ThreadStateEnum.INVITE_REJECTED.name());
}
public Boolean isInviteTimeout() {
return getState().equals(ThreadStateEnum.INVITE_TIMEOUT.name());
}
public Boolean isInviteCanceled() {
return getState().equals(ThreadStateEnum.INVITE_CANCELED.name());
}
public Boolean isOffline() {
return getState().equals(ThreadStateEnum.OFFLINE.name());
}

View File

@@ -91,7 +91,13 @@ public class ThreadEventListener {
ThreadEntity thread = event.getThread();
UserEntity user = thread.getOwner();
log.info("thread onThreadUpdateEvent: {}", thread.getUid());
if (thread.isClosed()) {
if (thread.isClosed()
|| thread.isTransferPending()
|| thread.isTransferAccepted()
|| thread.isTransferRejected()
|| thread.isTransferCanceled()
|| thread.isTransferTimeout()
) {
return;
}