summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorこぴなたみぽ <Syuilotan@yahoo.co.jp>2017-11-06 19:09:41 +0900
committerGitHub <noreply@github.com>2017-11-06 19:09:41 +0900
commit2099f494d7662a9298c6b3d9d2fe5488872f8ae1 (patch)
treed552a0b58a07b82e842715f4dbd22380ae0007be /src/common
parentchore(package): update @types/multer to version 1.3.5 (diff)
parentMerge pull request #710 from syuilo/greenkeeper/@types/bcryptjs-2.4.1 (diff)
downloadmisskey-2099f494d7662a9298c6b3d9d2fe5488872f8ae1.tar.gz
misskey-2099f494d7662a9298c6b3d9d2fe5488872f8ae1.tar.bz2
misskey-2099f494d7662a9298c6b3d9d2fe5488872f8ae1.zip
Merge branch 'master' into greenkeeper/@types/multer-1.3.5
Diffstat (limited to 'src/common')
-rw-r--r--src/common/get-post-summary.ts14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/common/get-post-summary.ts b/src/common/get-post-summary.ts
index f628a32b41..6e8f65708e 100644
--- a/src/common/get-post-summary.ts
+++ b/src/common/get-post-summary.ts
@@ -3,7 +3,13 @@
* @param {*} post 投稿
*/
const summarize = (post: any): string => {
- let summary = post.text ? post.text : '';
+ let summary = '';
+
+ // チャンネル
+ summary += post.channel ? `${post.channel.title}:` : '';
+
+ // 本文
+ summary += post.text ? post.text : '';
// メディアが添付されているとき
if (post.media) {
@@ -16,9 +22,9 @@ const summarize = (post: any): string => {
}
// 返信のとき
- if (post.reply_to_id) {
- if (post.reply_to) {
- summary += ` RE: ${summarize(post.reply_to)}`;
+ if (post.reply_id) {
+ if (post.reply) {
+ summary += ` RE: ${summarize(post.reply)}`;
} else {
summary += ' RE: ...';
}