mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-02-22 21:23:09 +01:00
fix m direct updated with other account data
This commit is contained in:
parent
e230a0316e
commit
b14dccbc8a
1 changed files with 6 additions and 4 deletions
|
@ -30,10 +30,12 @@ export const useBindMDirectAtom = (mx: MatrixClient, mDirect: typeof mDirectAtom
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleAccountData = (event: MatrixEvent) => {
|
const handleAccountData = (event: MatrixEvent) => {
|
||||||
|
if (event.getType() === AccountDataEvent.Direct) {
|
||||||
setMDirect({
|
setMDirect({
|
||||||
type: 'UPDATE',
|
type: 'UPDATE',
|
||||||
rooms: getMDirects(event),
|
rooms: getMDirects(event),
|
||||||
});
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
mx.on(ClientEvent.AccountData, handleAccountData);
|
mx.on(ClientEvent.AccountData, handleAccountData);
|
||||||
|
|
Loading…
Reference in a new issue