This commit is contained in:
the-djmaze 2023-02-20 23:51:08 +01:00
parent 79edca93ef
commit cf720e7105
2 changed files with 9 additions and 4 deletions

View file

@ -4,8 +4,8 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin
{
const
NAME = 'Nextcloud',
VERSION = '2.17',
RELEASE = '2023-01-31',
VERSION = '2.18',
RELEASE = '2023-02-20',
CATEGORY = 'Integrations',
DESCRIPTION = 'Integrate with Nextcloud v20+',
REQUIRED = '2.25.1';

View file

@ -6,6 +6,7 @@
let view = e.detail;
view.nextcloudAttach = () => {
rl.nextcloud.selectFiles().then(files => {
let urls = [];
files && files.forEach(file => {
if (file.name) {
let attachment = view.addAttachmentHelper(
@ -29,10 +30,14 @@
}
);
} else if (file.url) {
// TODO: other editors and text/plain
view.oEditor.editor.squire.makeLink(file.url);
urls.push(file.url);
}
});
if (urls.length) {
// TODO: other editors and text/plain
// https://github.com/the-djmaze/snappymail/issues/981
view.oEditor.editor.squire.insertHTML(urls.join("<br>"));
}
});
};
}