diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2018-11-02 08:59:40 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2018-11-02 08:59:40 +0900 |
| commit | 80b5fda292efd70cc749910e3672d50c9a70a72e (patch) | |
| tree | a8f287c9c60a532112801d084fcb7d5b8c4e3650 /src/remote/activitypub/misc | |
| parent | Fix bug (diff) | |
| download | sharkey-80b5fda292efd70cc749910e3672d50c9a70a72e.tar.gz sharkey-80b5fda292efd70cc749910e3672d50c9a70a72e.tar.bz2 sharkey-80b5fda292efd70cc749910e3672d50c9a70a72e.zip | |
Remote custom emojis (#3074)
* Remote custom emojis
* んほおおおおお
Diffstat (limited to 'src/remote/activitypub/misc')
| -rw-r--r-- | src/remote/activitypub/misc/get-emoji-names.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/remote/activitypub/misc/get-emoji-names.ts b/src/remote/activitypub/misc/get-emoji-names.ts new file mode 100644 index 0000000000..f744d02fed --- /dev/null +++ b/src/remote/activitypub/misc/get-emoji-names.ts @@ -0,0 +1,6 @@ +import parse from '../../../mfm/parse'; + +export default function(text: string) { + if (!text) return []; + return parse(text).filter(t => t.type === 'emoji').map(t => (t as any).emoji); +} |