fix: Refactor collection exports to not send email attachment (#2460)
Co-authored-by: Tom Moor <tom.moor@gmail.com>
This commit is contained in:
@@ -128,11 +128,11 @@ export type Props = {|
|
||||
fullwidth?: boolean,
|
||||
autoFocus?: boolean,
|
||||
style?: Object,
|
||||
as?: React.ComponentType<any>,
|
||||
as?: React.ComponentType<any> | string,
|
||||
to?: string,
|
||||
onClick?: (event: SyntheticEvent<>) => mixed,
|
||||
borderOnHover?: boolean,
|
||||
|
||||
href?: string,
|
||||
"data-on"?: string,
|
||||
"data-event-category"?: string,
|
||||
"data-event-action"?: string,
|
||||
|
||||
@@ -8,6 +8,7 @@ import AuthStore from "stores/AuthStore";
|
||||
import CollectionsStore from "stores/CollectionsStore";
|
||||
import DocumentPresenceStore from "stores/DocumentPresenceStore";
|
||||
import DocumentsStore from "stores/DocumentsStore";
|
||||
import FileOperationsStore from "stores/FileOperationsStore";
|
||||
import GroupsStore from "stores/GroupsStore";
|
||||
import MembershipsStore from "stores/MembershipsStore";
|
||||
import PoliciesStore from "stores/PoliciesStore";
|
||||
@@ -28,6 +29,7 @@ type Props = {
|
||||
views: ViewsStore,
|
||||
auth: AuthStore,
|
||||
toasts: ToastsStore,
|
||||
fileOperations: FileOperationsStore,
|
||||
};
|
||||
|
||||
@observer
|
||||
@@ -80,6 +82,7 @@ class SocketProvider extends React.Component<Props> {
|
||||
policies,
|
||||
presence,
|
||||
views,
|
||||
fileOperations,
|
||||
} = this.props;
|
||||
if (!auth.token) return;
|
||||
|
||||
@@ -287,6 +290,21 @@ class SocketProvider extends React.Component<Props> {
|
||||
}
|
||||
});
|
||||
|
||||
this.socket.on("fileOperations.update", async (event) => {
|
||||
const user = auth.user;
|
||||
let collection = null;
|
||||
|
||||
if (event.collectionId)
|
||||
collection = await collections.fetch(event.collectionId);
|
||||
if (user) {
|
||||
fileOperations.add({
|
||||
...event,
|
||||
user,
|
||||
collection,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// received a message from the API server that we should request
|
||||
// to join a specific room. Forward that to the ws server.
|
||||
this.socket.on("join", (event) => {
|
||||
@@ -345,5 +363,6 @@ export default inject(
|
||||
"memberships",
|
||||
"presence",
|
||||
"policies",
|
||||
"views"
|
||||
"views",
|
||||
"fileOperations"
|
||||
)(SocketProvider);
|
||||
|
||||
Reference in New Issue
Block a user