fix: collections.create event not propagated when initialized with private permissions
This commit is contained in:
@@ -5,6 +5,7 @@ import { observer } from "mobx-react";
|
||||
import * as React from "react";
|
||||
import { io, Socket } from "socket.io-client";
|
||||
import RootStore from "~/stores/RootStore";
|
||||
import Collection from "~/models/Collection";
|
||||
import Document from "~/models/Document";
|
||||
import FileOperation from "~/models/FileOperation";
|
||||
import Pin from "~/models/Pin";
|
||||
@@ -267,6 +268,10 @@ class SocketProvider extends React.Component<Props> {
|
||||
groups.remove(event.modelId);
|
||||
});
|
||||
|
||||
this.socket.on("collections.create", (event: PartialWithId<Collection>) => {
|
||||
collections.add(event);
|
||||
});
|
||||
|
||||
this.socket.on(
|
||||
"collections.delete",
|
||||
(event: WebsocketEntityDeletedEvent) => {
|
||||
|
||||
Reference in New Issue
Block a user