You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-23 22:36:32 +02:00
This commit is contained in:
@@ -6,6 +6,7 @@ import shim from '../shim';
|
||||
import time from '../time';
|
||||
import markdownUtils from '../markdownUtils';
|
||||
import { NoteEntity } from '../services/database/types';
|
||||
import Tag from './Tag';
|
||||
|
||||
const { sprintf } = require('sprintf-js');
|
||||
import Resource from './Resource';
|
||||
@@ -615,7 +616,13 @@ export default class Note extends BaseItem {
|
||||
newNote.title = title;
|
||||
}
|
||||
|
||||
return this.save(newNote);
|
||||
const newNoteSaved = await this.save(newNote);
|
||||
const originalTags = await Tag.tagsByNoteId(noteId);
|
||||
for (const tagToAdd of originalTags) {
|
||||
await Tag.addNote(tagToAdd.id, newNoteSaved.id);
|
||||
}
|
||||
|
||||
return this.save(newNoteSaved);
|
||||
}
|
||||
|
||||
static async noteIsOlderThan(noteId: string, date: number) {
|
||||
|
||||
Reference in New Issue
Block a user