diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-10-07 06:58:50 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-10-07 06:58:50 +0900 |
| commit | fe98dd927de6906671dfd3aa9671080ab6a065c6 (patch) | |
| tree | d8216b495d05fb1b3a015da39996a76c3065636a /src | |
| parent | :v: (diff) | |
| download | sharkey-fe98dd927de6906671dfd3aa9671080ab6a065c6.tar.gz sharkey-fe98dd927de6906671dfd3aa9671080ab6a065c6.tar.bz2 sharkey-fe98dd927de6906671dfd3aa9671080ab6a065c6.zip | |
:v:
Diffstat (limited to 'src')
| -rw-r--r-- | src/api/bot/core.ts | 6 | ||||
| -rw-r--r-- | src/common/get-post-summary.ts (renamed from src/common/get-post-summary.js) | 2 | ||||
| -rw-r--r-- | src/web/app/desktop/script.js | 2 | ||||
| -rw-r--r-- | src/web/app/desktop/tags/notifications.tag | 2 | ||||
| -rw-r--r-- | src/web/app/desktop/tags/pages/home.tag | 2 | ||||
| -rw-r--r-- | src/web/app/mobile/tags/notification-preview.tag | 2 | ||||
| -rw-r--r-- | src/web/app/mobile/tags/notification.tag | 2 | ||||
| -rw-r--r-- | src/web/app/mobile/tags/notifications.tag | 2 | ||||
| -rw-r--r-- | src/web/app/mobile/tags/page/home.tag | 2 | ||||
| -rw-r--r-- | src/web/app/mobile/tags/post-detail.tag | 2 | ||||
| -rw-r--r-- | src/web/app/mobile/tags/timeline.tag | 2 | ||||
| -rw-r--r-- | src/web/app/mobile/tags/user.tag | 2 |
12 files changed, 15 insertions, 13 deletions
diff --git a/src/api/bot/core.ts b/src/api/bot/core.ts index cf2bdef1dc..57330e67eb 100644 --- a/src/api/bot/core.ts +++ b/src/api/bot/core.ts @@ -3,7 +3,7 @@ import * as bcrypt from 'bcryptjs'; import User, { IUser } from '../models/user'; -import getPostSummary from '../../common/get-post-summary.js'; +import getPostSummary from '../../common/get-post-summary'; export default class BotCore extends EventEmitter { public user: IUser = null; @@ -109,7 +109,9 @@ export default class BotCore extends EventEmitter { public async getTl() { if (this.user == null) return 'まずサインインしてください。'; - const tl = await require('../endpoints/posts/timeline')({}, this.user); + const tl = await require('../endpoints/posts/timeline')({ + limit: 5 + }, this.user); const text = tl .map(post => getPostSummary(post)) diff --git a/src/common/get-post-summary.js b/src/common/get-post-summary.ts index f7a481a164..f628a32b41 100644 --- a/src/common/get-post-summary.js +++ b/src/common/get-post-summary.ts @@ -2,7 +2,7 @@ * 投稿を表す文字列を取得します。 * @param {*} post 投稿 */ -const summarize = post => { +const summarize = (post: any): string => { let summary = post.text ? post.text : ''; // メディアが添付されているとき diff --git a/src/web/app/desktop/script.js b/src/web/app/desktop/script.js index e3dc8b7d96..46a7fce700 100644 --- a/src/web/app/desktop/script.js +++ b/src/web/app/desktop/script.js @@ -11,7 +11,7 @@ import * as riot from 'riot'; import init from '../init'; import route from './router'; import fuckAdBlock from './scripts/fuck-ad-block'; -import getPostSummary from '../../../common/get-post-summary'; +import getPostSummary from '../../../common/get-post-summary.ts'; /** * init diff --git a/src/web/app/desktop/tags/notifications.tag b/src/web/app/desktop/tags/notifications.tag index 4747d1c0f4..1046358ce9 100644 --- a/src/web/app/desktop/tags/notifications.tag +++ b/src/web/app/desktop/tags/notifications.tag @@ -207,7 +207,7 @@ </style> <script> - import getPostSummary from '../../../../common/get-post-summary'; + import getPostSummary from '../../../../common/get-post-summary.ts'; this.getPostSummary = getPostSummary; this.mixin('i'); diff --git a/src/web/app/desktop/tags/pages/home.tag b/src/web/app/desktop/tags/pages/home.tag index a56c546059..e8ba4023de 100644 --- a/src/web/app/desktop/tags/pages/home.tag +++ b/src/web/app/desktop/tags/pages/home.tag @@ -8,7 +8,7 @@ </style> <script> import Progress from '../../../common/scripts/loading'; - import getPostSummary from '../../../../../common/get-post-summary'; + import getPostSummary from '../../../../../common/get-post-summary.ts'; this.mixin('i'); this.mixin('api'); diff --git a/src/web/app/mobile/tags/notification-preview.tag b/src/web/app/mobile/tags/notification-preview.tag index 36b4f5eda7..1fdcc57641 100644 --- a/src/web/app/mobile/tags/notification-preview.tag +++ b/src/web/app/mobile/tags/notification-preview.tag @@ -110,7 +110,7 @@ </style> <script> - import getPostSummary from '../../../../common/get-post-summary'; + import getPostSummary from '../../../../common/get-post-summary.ts'; this.getPostSummary = getPostSummary; this.notification = this.opts.notification; </script> diff --git a/src/web/app/mobile/tags/notification.tag b/src/web/app/mobile/tags/notification.tag index 416493ee23..53222b9dbe 100644 --- a/src/web/app/mobile/tags/notification.tag +++ b/src/web/app/mobile/tags/notification.tag @@ -163,7 +163,7 @@ </style> <script> - import getPostSummary from '../../../../common/get-post-summary'; + import getPostSummary from '../../../../common/get-post-summary.ts'; this.getPostSummary = getPostSummary; this.notification = this.opts.notification; </script> diff --git a/src/web/app/mobile/tags/notifications.tag b/src/web/app/mobile/tags/notifications.tag index 9985b3351c..7370aa84d3 100644 --- a/src/web/app/mobile/tags/notifications.tag +++ b/src/web/app/mobile/tags/notifications.tag @@ -78,7 +78,7 @@ </style> <script> - import getPostSummary from '../../../../common/get-post-summary'; + import getPostSummary from '../../../../common/get-post-summary.ts'; this.getPostSummary = getPostSummary; this.mixin('api'); diff --git a/src/web/app/mobile/tags/page/home.tag b/src/web/app/mobile/tags/page/home.tag index 6f7369798e..3b0255b293 100644 --- a/src/web/app/mobile/tags/page/home.tag +++ b/src/web/app/mobile/tags/page/home.tag @@ -9,7 +9,7 @@ <script> import ui from '../../scripts/ui-event'; import Progress from '../../../common/scripts/loading'; - import getPostSummary from '../../../../../common/get-post-summary'; + import getPostSummary from '../../../../../common/get-post-summary.ts'; import openPostForm from '../../scripts/open-post-form'; this.mixin('i'); diff --git a/src/web/app/mobile/tags/post-detail.tag b/src/web/app/mobile/tags/post-detail.tag index 4be1a8080a..ed275749ec 100644 --- a/src/web/app/mobile/tags/post-detail.tag +++ b/src/web/app/mobile/tags/post-detail.tag @@ -264,7 +264,7 @@ </style> <script> import compile from '../../common/scripts/text-compiler'; - import getPostSummary from '../../../../common/get-post-summary'; + import getPostSummary from '../../../../common/get-post-summary.ts'; import openPostForm from '../scripts/open-post-form'; this.mixin('api'); diff --git a/src/web/app/mobile/tags/timeline.tag b/src/web/app/mobile/tags/timeline.tag index 80debbf66e..5ecc2df9d1 100644 --- a/src/web/app/mobile/tags/timeline.tag +++ b/src/web/app/mobile/tags/timeline.tag @@ -464,7 +464,7 @@ </style> <script> import compile from '../../common/scripts/text-compiler'; - import getPostSummary from '../../../../common/get-post-summary'; + import getPostSummary from '../../../../common/get-post-summary.ts'; import openPostForm from '../scripts/open-post-form'; this.mixin('api'); diff --git a/src/web/app/mobile/tags/user.tag b/src/web/app/mobile/tags/user.tag index cc34074218..a332e930e2 100644 --- a/src/web/app/mobile/tags/user.tag +++ b/src/web/app/mobile/tags/user.tag @@ -428,7 +428,7 @@ </style> <script> - import summary from '../../../../common/get-post-summary'; + import summary from '../../../../common/get-post-summary.ts'; this.post = this.opts.post; this.text = summary(this.post); |