summaryrefslogtreecommitdiff
path: root/src/services
diff options
context:
space:
mode:
authornullobsi <me@nullob.si>2021-05-27 17:38:09 -0700
committerGitHub <noreply@github.com>2021-05-28 09:38:09 +0900
commitffb9646ce9c3d2326a3e922e58702674eb65646c (patch)
treebb656e32c4b61313faad218578018a7bcc989e05 /src/services
parentimprove types (diff)
downloadmisskey-ffb9646ce9c3d2326a3e922e58702674eb65646c.tar.gz
misskey-ffb9646ce9c3d2326a3e922e58702674eb65646c.tar.bz2
misskey-ffb9646ce9c3d2326a3e922e58702674eb65646c.zip
Add image description support (#7518)
* recieve image descriptions under the name property * fix other components * use comment for alt and title * allow editing of file comment * allow editing of file comment in note dialog * federate note comments * use file instead of this * backend should accept comment on update * update now actually accepts comment * allow multiline descriptions * image should also have description attached * Update locales/ja-JP.yml Co-authored-by: rinsuki <428rinsuki+git@gmail.com> * Use custom component with side-by-side image * improve usability on mobile devices * revert changes * Update post-form-attaches.vue * Update drive.file.vue * Update media-caption.vue Co-authored-by: rinsuki <428rinsuki+git@gmail.com> Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
Diffstat (limited to 'src/services')
-rw-r--r--src/services/drive/upload-from-url.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/services/drive/upload-from-url.ts b/src/services/drive/upload-from-url.ts
index 2f4c5aeeaf..2f660d9035 100644
--- a/src/services/drive/upload-from-url.ts
+++ b/src/services/drive/upload-from-url.ts
@@ -25,6 +25,12 @@ export default async (
name = null;
}
+ // If the comment is same as the name, skip comment
+ // (image.name is passed in when receiving attachment)
+ if (comment !== null && name == comment) {
+ comment = null;
+ }
+
// Create temp file
const [path, cleanup] = await createTemp();