diff --git a/packages/backend/src/core/MessagingService.ts b/packages/backend/src/core/MessagingService.ts index bb3671c8b0..e6c8976ae4 100644 --- a/packages/backend/src/core/MessagingService.ts +++ b/packages/backend/src/core/MessagingService.ts @@ -162,7 +162,7 @@ export class MessagingService { @bindThis public async deleteMessage(message: MiMessagingMessage) { await this.messagingMessagesRepository.delete(message.id); - this.postDeleteMessage(message); + await this.postDeleteMessage(message); } @bindThis diff --git a/packages/backend/src/core/RoleService.ts b/packages/backend/src/core/RoleService.ts index 6ed2762866..60c05de653 100644 --- a/packages/backend/src/core/RoleService.ts +++ b/packages/backend/src/core/RoleService.ts @@ -105,8 +105,8 @@ export class RoleService implements OnApplicationShutdown { ) { //this.onMessage = this.onMessage.bind(this); - this.rolesCache = new MemorySingleCache(1000 * 60 * 60 * 1); - this.roleAssignmentByUserIdCache = new MemoryKVCache(1000 * 60 * 60 * 1); + this.rolesCache = new MemorySingleCache(1000 * 60 * 60); + this.roleAssignmentByUserIdCache = new MemoryKVCache(1000 * 60 * 60); this.redisForSub.on('message', this.onMessage); } diff --git a/packages/backend/src/server/api/stream/channels/messaging.ts b/packages/backend/src/server/api/stream/channels/messaging.ts index 82518f4c32..f35ef339fb 100644 --- a/packages/backend/src/server/api/stream/channels/messaging.ts +++ b/packages/backend/src/server/api/stream/channels/messaging.ts @@ -63,7 +63,7 @@ class MessagingChannel extends Channel { this.emitTypersIntervalId = setInterval(this.emitTypers, 5000); this.subCh = this.otherpartyId - ? `messagingStream:${this.user!.id}-${this.otherpartyId}` + ? `messagingStream:${this.user?.id}-${this.otherpartyId}` : `messagingStream:${this.groupId}`; // Subscribe messaging stream diff --git a/packages/frontend/src/pages/messaging/messaging-room.vue b/packages/frontend/src/pages/messaging/messaging-room.vue index 37eb6dbec8..81c1cc6a6f 100644 --- a/packages/frontend/src/pages/messaging/messaging-room.vue +++ b/packages/frontend/src/pages/messaging/messaging-room.vue @@ -268,7 +268,9 @@ function onDeleted(id) { } function thisScrollToBottom() { - scrollToBottom($$(rootEl).value, { behavior: 'smooth' }); + if (window.location.href.includes('my/messaging/')) { + scrollToBottom($$(rootEl).value, { behavior: 'smooth' }); + } } function onIndicatorClick() { @@ -309,8 +311,8 @@ onBeforeUnmount(() => { }); definePageMetadata(computed(() => !fetching ? user ? { - title: '', - icon: null, + title: '', + icon: null, userName: user, avatar: user, } : {