diff options
| author | Akihiko Odaki <nekomanma@pixiv.co.jp> | 2018-03-26 00:19:07 +0900 |
|---|---|---|
| committer | Akihiko Odaki <nekomanma@pixiv.co.jp> | 2018-03-26 14:07:16 +0900 |
| commit | 19b9cb105d49e2a00ae19e3dc1f2d36dc394f148 (patch) | |
| tree | 5faa9ad213bbf2efdcb4d06cf4fc941a501ab7f8 /src/api/bot/interfaces | |
| parent | Allow to use domain whose prefix is not misskey (diff) | |
| download | sharkey-19b9cb105d49e2a00ae19e3dc1f2d36dc394f148.tar.gz sharkey-19b9cb105d49e2a00ae19e3dc1f2d36dc394f148.tar.bz2 sharkey-19b9cb105d49e2a00ae19e3dc1f2d36dc394f148.zip | |
Introduce account document to user document
An account document is attached to a user document if an account of the
user is on the server. It may be missing if the user is on a remote server.
Diffstat (limited to 'src/api/bot/interfaces')
| -rw-r--r-- | src/api/bot/interfaces/line.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/api/bot/interfaces/line.ts b/src/api/bot/interfaces/line.ts index 43c25f8032..bf08821594 100644 --- a/src/api/bot/interfaces/line.ts +++ b/src/api/bot/interfaces/line.ts @@ -110,11 +110,11 @@ class LineBot extends BotCore { data: `showtl|${user.id}` }); - if (user.twitter) { + if (user.account.twitter) { actions.push({ type: 'uri', label: 'Twitterアカウントを見る', - uri: `https://twitter.com/${user.twitter.screen_name}` + uri: `https://twitter.com/${user.account.twitter.screen_name}` }); } @@ -171,7 +171,7 @@ module.exports = async (app: express.Application) => { if (session == null) { const user = await User.findOne({ - line: { + 'account.line': { user_id: sourceId } }); @@ -181,7 +181,7 @@ module.exports = async (app: express.Application) => { bot.on('signin', user => { User.update(user._id, { $set: { - line: { + 'account.line': { user_id: sourceId } } @@ -191,7 +191,7 @@ module.exports = async (app: express.Application) => { bot.on('signout', user => { User.update(user._id, { $set: { - line: { + 'account.line': { user_id: null } } |