a bunch of bug fixes and improvements

This commit is contained in:
Zoe
2023-04-28 00:28:37 -05:00
parent a7c91b382a
commit b88b3207b3
27 changed files with 494 additions and 184 deletions

View File

@@ -1,4 +1,4 @@
import { IChannel } from '~/types';
import { IChannel, IUser, SafeUser } from '~/types';
export const useDmStore = defineStore('dmStore', {
state: () => ({
@@ -18,6 +18,9 @@ export const useDmStore = defineStore('dmStore', {
},
getById(id: string) {
return this.dms.find((e) => e.id === id);
},
getByPartnerId(id: string) {
return this.dms.find((e) => e.dmParticipants?.some((e: SafeUser) => e.id === id));
}
}
});