summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorMeiMei <30769358+mei23@users.noreply.github.com>2018-11-25 01:39:22 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2018-11-25 01:39:22 +0900
commit93f13ffc8e5c5fdc7cb08362308128f5ab64643a (patch)
treebb2204370bf1e6318a46743c27b14cca9efe0cbe /src/client
parent10.57.2 (diff)
downloadsharkey-93f13ffc8e5c5fdc7cb08362308128f5ab64643a.tar.gz
sharkey-93f13ffc8e5c5fdc7cb08362308128f5ab64643a.tar.bz2
sharkey-93f13ffc8e5c5fdc7cb08362308128f5ab64643a.zip
Fix: url-preview (#3397)
Diffstat (limited to 'src/client')
-rw-r--r--src/client/app/common/scripts/note-mixin.ts4
-rw-r--r--src/client/app/common/views/components/messaging-room.message.vue4
-rw-r--r--src/client/app/desktop/views/components/note-detail.vue4
-rw-r--r--src/client/app/mobile/views/components/note-detail.vue4
4 files changed, 8 insertions, 8 deletions
diff --git a/src/client/app/common/scripts/note-mixin.ts b/src/client/app/common/scripts/note-mixin.ts
index e0df788b34..205c6dc02b 100644
--- a/src/client/app/common/scripts/note-mixin.ts
+++ b/src/client/app/common/scripts/note-mixin.ts
@@ -79,8 +79,8 @@ export default (opts: Opts = {}) => ({
if (this.appearNote.text) {
const ast = parse(this.appearNote.text);
return unique(ast
- .filter(t => (t.type == 'url' || t.type == 'link') && !t.silent)
- .map(t => t.url));
+ .filter(t => ((t.name == 'url' || t.name == 'link') && t.props.url && !t.silent))
+ .map(t => t.props.url));
} else {
return null;
}
diff --git a/src/client/app/common/views/components/messaging-room.message.vue b/src/client/app/common/views/components/messaging-room.message.vue
index 966bd54170..758ce2c273 100644
--- a/src/client/app/common/views/components/messaging-room.message.vue
+++ b/src/client/app/common/views/components/messaging-room.message.vue
@@ -51,8 +51,8 @@ export default Vue.extend({
if (this.message.text) {
const ast = parse(this.message.text);
return unique(ast
- .filter(t => (t.type == 'url' || t.type == 'link') && !t.silent)
- .map(t => t.url));
+ .filter(t => ((t.name == 'url' || t.name == 'link') && t.props.url && !t.silent))
+ .map(t => t.props.url));
} else {
return null;
}
diff --git a/src/client/app/desktop/views/components/note-detail.vue b/src/client/app/desktop/views/components/note-detail.vue
index 37c4093355..877577edcd 100644
--- a/src/client/app/desktop/views/components/note-detail.vue
+++ b/src/client/app/desktop/views/components/note-detail.vue
@@ -151,8 +151,8 @@ export default Vue.extend({
if (this.appearNote.text) {
const ast = parse(this.appearNote.text);
return unique(ast
- .filter(t => (t.type == 'url' || t.type == 'link') && !t.silent)
- .map(t => t.url));
+ .filter(t => ((t.name == 'url' || t.name == 'link') && t.props.url && !t.silent))
+ .map(t => t.props.url));
} else {
return null;
}
diff --git a/src/client/app/mobile/views/components/note-detail.vue b/src/client/app/mobile/views/components/note-detail.vue
index 61968a64d1..19455aeae2 100644
--- a/src/client/app/mobile/views/components/note-detail.vue
+++ b/src/client/app/mobile/views/components/note-detail.vue
@@ -143,8 +143,8 @@ export default Vue.extend({
if (this.appearNote.text) {
const ast = parse(this.appearNote.text);
return unique(ast
- .filter(t => (t.type == 'url' || t.type == 'link') && !t.silent)
- .map(t => t.url));
+ .filter(t => ((t.name == 'url' || t.name == 'link') && t.props.url && !t.silent))
+ .map(t => t.props.url));
} else {
return null;
}