Skip to content
Snippets Groups Projects
Commit 9d1ed1eb authored by MeiMei's avatar MeiMei Committed by syuilo
Browse files

Some import and export fixes (#4842)

* Fix: Mastodon v2.8.0 のフォローリストがインポートできない

* Fix: エクスポートリクエストに失敗してもエラーが出ない (#4821)

* エクスポートファイルでは同一ハッシュチェックをしないように
parent a09a3465
No related branches found
No related tags found
No related merge requests found
......@@ -290,12 +290,17 @@ export default Vue.extend({
this.exportTarget == 'mute' ? 'i/export-mute' :
this.exportTarget == 'blocking' ? 'i/export-blocking' :
this.exportTarget == 'user-lists' ? 'i/export-user-lists' :
null, {});
this.$root.dialog({
type: 'info',
text: this.$t('export-requested')
});
null, {}).then(() => {
this.$root.dialog({
type: 'info',
text: this.$t('export-requested')
});
}).catch((e: any) => {
this.$root.dialog({
type: 'error',
text: e.message
});
});
},
doImport() {
......
......@@ -85,7 +85,7 @@ export async function exportBlocking(job: Bull.Job, done: any): Promise<void> {
logger.succ(`Exported to: ${path}`);
const fileName = 'blocking-' + dateFormat(new Date(), 'yyyy-mm-dd-HH-MM-ss') + '.csv';
const driveFile = await addFile(user, path, fileName);
const driveFile = await addFile(user, path, fileName, null, null, true);
logger.succ(`Exported to: ${driveFile.id}`);
cleanup();
......
......@@ -85,7 +85,7 @@ export async function exportFollowing(job: Bull.Job, done: any): Promise<void> {
logger.succ(`Exported to: ${path}`);
const fileName = 'following-' + dateFormat(new Date(), 'yyyy-mm-dd-HH-MM-ss') + '.csv';
const driveFile = await addFile(user, path, fileName);
const driveFile = await addFile(user, path, fileName, null, null, true);
logger.succ(`Exported to: ${driveFile.id}`);
cleanup();
......
......@@ -85,7 +85,7 @@ export async function exportMute(job: Bull.Job, done: any): Promise<void> {
logger.succ(`Exported to: ${path}`);
const fileName = 'mute-' + dateFormat(new Date(), 'yyyy-mm-dd-HH-MM-ss') + '.csv';
const driveFile = await addFile(user, path, fileName);
const driveFile = await addFile(user, path, fileName, null, null, true);
logger.succ(`Exported to: ${driveFile.id}`);
cleanup();
......
......@@ -108,7 +108,7 @@ export async function exportNotes(job: Bull.Job, done: any): Promise<void> {
logger.succ(`Exported to: ${path}`);
const fileName = 'notes-' + dateFormat(new Date(), 'yyyy-mm-dd-HH-MM-ss') + '.json';
const driveFile = await addFile(user, path, fileName);
const driveFile = await addFile(user, path, fileName, null, null, true);
logger.succ(`Exported to: ${driveFile.id}`);
cleanup();
......
......@@ -62,7 +62,7 @@ export async function exportUserLists(job: Bull.Job, done: any): Promise<void> {
logger.succ(`Exported to: ${path}`);
const fileName = 'user-lists-' + dateFormat(new Date(), 'yyyy-mm-dd-HH-MM-ss') + '.csv';
const driveFile = await addFile(user, path, fileName);
const driveFile = await addFile(user, path, fileName, null, null, true);
logger.succ(`Exported to: ${driveFile.id}`);
cleanup();
......
......@@ -35,7 +35,8 @@ export async function importFollowing(job: Bull.Job, done: any): Promise<void> {
linenum++;
try {
const { username, host } = parseAcct(line.trim());
const acct = line.split(',')[0].trim();
const { username, host } = parseAcct(acct);
let target = isSelfHost(host!) ? await Users.findOne({
host: null,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment