summaryrefslogtreecommitdiff
path: root/src/web/app/common/scripts
diff options
context:
space:
mode:
authorha-dai <contact@haradai.net>2017-10-25 16:24:16 +0900
committerha-dai <contact@haradai.net>2017-10-25 16:24:16 +0900
commitfabcad6db9dff573ef1b3a634db813e8eff7d82e (patch)
treee2c312df68bdd508b7422fbe15a35351c6a589b0 /src/web/app/common/scripts
parentMerge pull request #788 from syuilo/greenkeeper/@types/morgan-1.7.33 (diff)
parentMerge branch 'master' of https://github.com/syuilo/misskey (diff)
downloadmisskey-fabcad6db9dff573ef1b3a634db813e8eff7d82e.tar.gz
misskey-fabcad6db9dff573ef1b3a634db813e8eff7d82e.tar.bz2
misskey-fabcad6db9dff573ef1b3a634db813e8eff7d82e.zip
Merge branch 'master' of https://github.com/syuilo/misskey
Diffstat (limited to 'src/web/app/common/scripts')
-rw-r--r--src/web/app/common/scripts/get-post-summary.js35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/web/app/common/scripts/get-post-summary.js b/src/web/app/common/scripts/get-post-summary.js
deleted file mode 100644
index 83eda8f6b4..0000000000
--- a/src/web/app/common/scripts/get-post-summary.js
+++ /dev/null
@@ -1,35 +0,0 @@
-const summarize = post => {
- let summary = post.text ? post.text : '';
-
- // メディアが添付されているとき
- if (post.media) {
- summary += ` (${post.media.length}つのメディア)`;
- }
-
- // 投票が添付されているとき
- if (post.poll) {
- summary += ' (投票)';
- }
-
- // 返信のとき
- if (post.reply_to_id) {
- if (post.reply_to) {
- summary += ` RE: ${summarize(post.reply_to)}`;
- } else {
- summary += ' RE: ...';
- }
- }
-
- // Repostのとき
- if (post.repost_id) {
- if (post.repost) {
- summary += ` RP: ${summarize(post.repost)}`;
- } else {
- summary += ' RP: ...';
- }
- }
-
- return summary.trim();
-};
-
-export default summarize;