summaryrefslogtreecommitdiff
path: root/src/web/app/common/scripts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-10-07 03:36:46 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-10-07 03:36:46 +0900
commit6a5c6280ffd3ffe820beb23294f1c2c1f5deb9cf (patch)
treeeb9006394a36bfa80bd255e9d86a524060c37828 /src/web/app/common/scripts
parentMerge pull request #817 from syuilo/greenkeeper/@types/mongodb-2.2.13 (diff)
downloadsharkey-6a5c6280ffd3ffe820beb23294f1c2c1f5deb9cf.tar.gz
sharkey-6a5c6280ffd3ffe820beb23294f1c2c1f5deb9cf.tar.bz2
sharkey-6a5c6280ffd3ffe820beb23294f1c2c1f5deb9cf.zip
:v:
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;