Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMPROVE] User data download overhaul #26358

Merged
merged 18 commits into from
Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/meteor/app/api/server/v1/rooms.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
findRoomsAvailableForTeams,
findChannelAndPrivateAutocompleteWithPagination,
} from '../lib/rooms';
import { sendFile, sendViaEmail } from '../../../../server/lib/channelExport';
import * as dataExport from '../../../../server/lib/dataExport';
import { canAccessRoom, canAccessRoomId, hasPermission } from '../../../authorization/server';
import { Media } from '../../../../server/sdk';
import { settings } from '../../../settings/server/index';
Expand Down Expand Up @@ -546,7 +546,7 @@ API.v1.addRoute(
throw new Meteor.Error('error-invalid-dates', 'From date cannot be after To date');
}

sendFile(
dataExport.sendFile(
{
rid,
format,
Expand All @@ -569,7 +569,7 @@ API.v1.addRoute(
throw new Meteor.Error('error-invalid-messages');
}

const result = sendViaEmail(
const result = dataExport.sendViaEmail(
{
rid,
toUsers,
Expand Down
4 changes: 2 additions & 2 deletions apps/meteor/app/mailer/server/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export const sendNoWrap = ({
text,
headers,
}: {
to: string;
to: string | string[];
from: string;
replyTo?: string;
subject: string;
Expand Down Expand Up @@ -184,7 +184,7 @@ export const send = ({
data,
headers,
}: {
to: string;
to: string | string[];
from: string;
replyTo?: string;
subject: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const pruneCronName = 'Prune old messages by retention policy';

function deployCron(precision: string): void {
SyncedCron.remove(pruneCronName);

SyncedCron.add({
name: pruneCronName,
schedule: (parser) => parser.cron(precision),
Expand Down
1 change: 0 additions & 1 deletion apps/meteor/app/user-data-download/index.js

This file was deleted.

53 changes: 0 additions & 53 deletions apps/meteor/app/user-data-download/server/DataExport.js

This file was deleted.

Loading