Merge branch 'develop' into sw-notification-action

This commit is contained in:
tamaina
2021-04-03 23:55:55 +09:00
32 changed files with 263 additions and 1772 deletions

View File

@@ -40,6 +40,7 @@
<FormLink to="https://github.com/rinsuki" external>@rinsuki</FormLink>
<FormLink to="https://github.com/Xeltica" external>@Xeltica</FormLink>
<FormLink to="https://github.com/u1-liquid" external>@u1-liquid</FormLink>
<FormLink to="https://github.com/marihachi" external>@marihachi</FormLink>
<template #caption><MkLink url="https://github.com/misskey-dev/misskey/graphs/contributors">{{ $ts._aboutMisskey.allContributors }}</MkLink></template>
</FormGroup>
<FormGroup>

View File

@@ -37,8 +37,8 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { parse } from '../../../mfm/parse';
import { unique } from '../../../prelude/array';
import * as mfm from 'mfm-js';
import { extractUrlFromMfm } from '@/misc/extract-url-from-mfm';
import MkUrlPreview from '@client/components/url-preview.vue';
import * as os from '@client/os';
@@ -60,10 +60,7 @@ export default defineComponent({
},
urls(): string[] {
if (this.message.text) {
const ast = parse(this.message.text);
return unique(ast
.filter(t => ((t.node.type === 'url' || t.node.type === 'link') && t.node.props.url && !t.node.props.silent))
.map(t => t.node.props.url));
return extractUrlFromMfm(mfm.parse(this.message.text));
} else {
return [];
}