summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-11-11 01:15:11 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-11-11 01:15:11 +0900
commitf3dd5da931fb4cb946d9243b6735b68927ca8a61 (patch)
tree2842e3f26591e152d99e713a632ef96ff3dfeb22 /src
parentFix bug (diff)
downloadsharkey-f3dd5da931fb4cb946d9243b6735b68927ca8a61.tar.gz
sharkey-f3dd5da931fb4cb946d9243b6735b68927ca8a61.tar.bz2
sharkey-f3dd5da931fb4cb946d9243b6735b68927ca8a61.zip
Improve readability
Diffstat (limited to 'src')
-rw-r--r--src/api/bot/core.ts2
-rw-r--r--src/common/get-notification-summary.ts12
2 files changed, 7 insertions, 7 deletions
diff --git a/src/api/bot/core.ts b/src/api/bot/core.ts
index 4b8d244471..ddae6405f5 100644
--- a/src/api/bot/core.ts
+++ b/src/api/bot/core.ts
@@ -313,7 +313,7 @@ class TlContext extends Context {
this.emit('updated');
const text = tl
- .map(post => post.user.name + ': ' + getPostSummary(post))
+ .map(post => `${post.user.name}\n「${getPostSummary(post)}」`)
.join('\n-----\n');
return text;
diff --git a/src/common/get-notification-summary.ts b/src/common/get-notification-summary.ts
index b49a170b65..03db722c84 100644
--- a/src/common/get-notification-summary.ts
+++ b/src/common/get-notification-summary.ts
@@ -10,17 +10,17 @@ export default function(notification: any): string {
case 'follow':
return `${notification.user.name}にフォローされました`;
case 'mention':
- return `言及されました: ${notification.user.name}「${getPostSummary(notification.post)}」`;
+ return `言及されました:\n${notification.user.name}「${getPostSummary(notification.post)}」`;
case 'reply':
- return `返信されました: ${notification.user.name}「${getPostSummary(notification.post)}」`;
+ return `返信されました:\n${notification.user.name}「${getPostSummary(notification.post)}」`;
case 'repost':
- return `Repostされました: ${notification.user.name}「${getPostSummary(notification.post)}」`;
+ return `Repostされました:\n${notification.user.name}「${getPostSummary(notification.post)}」`;
case 'quote':
- return `引用されました: ${notification.user.name}「${getPostSummary(notification.post)}」`;
+ return `引用されました:\n${notification.user.name}「${getPostSummary(notification.post)}」`;
case 'reaction':
- return `リアクションされました: ${notification.user.name} <${getReactionEmoji(notification.reaction)}>「${getPostSummary(notification.post)}」`;
+ return `リアクションされました:\n${notification.user.name} <${getReactionEmoji(notification.reaction)}>「${getPostSummary(notification.post)}」`;
case 'poll_vote':
- return `投票されました: ${notification.user.name}「${getPostSummary(notification.post)}」`;
+ return `投票されました:\n${notification.user.name}「${getPostSummary(notification.post)}」`;
default:
return `<不明な通知タイプ: ${notification.type}>`;
}