Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
noridev committed Sep 23, 2023
1 parent 7bdab6a commit f331bbf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/backend/src/core/MessagingService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/core/RoleService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ export class RoleService implements OnApplicationShutdown {
) {
//this.onMessage = this.onMessage.bind(this);

this.rolesCache = new MemorySingleCache<MiRole[]>(1000 * 60 * 60 * 1);
this.roleAssignmentByUserIdCache = new MemoryKVCache<MiRoleAssignment[]>(1000 * 60 * 60 * 1);
this.rolesCache = new MemorySingleCache<MiRole[]>(1000 * 60 * 60);
this.roleAssignmentByUserIdCache = new MemoryKVCache<MiRoleAssignment[]>(1000 * 60 * 60);

this.redisForSub.on('message', this.onMessage);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions packages/frontend/src/pages/messaging/messaging-room.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -309,8 +311,8 @@ onBeforeUnmount(() => {
});

definePageMetadata(computed(() => !fetching ? user ? {
title: '',
icon: null,
title: '',
icon: null,
userName: user,
avatar: user,
} : {
Expand Down

0 comments on commit f331bbf

Please sign in to comment.