Improve readability

This commit is contained in:
syuilo 2017-11-11 01:15:11 +09:00
parent f14fbfa3b6
commit f3dd5da931
2 changed files with 7 additions and 7 deletions

View File

@ -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;

View File

@ -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}>`;
}