summaryrefslogtreecommitdiff
path: root/src/api/bot
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/bot')
-rw-r--r--src/api/bot/core.ts2
-rw-r--r--src/api/bot/interfaces/line.ts10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/api/bot/core.ts b/src/api/bot/core.ts
index 1f07d4eee9..ad29f1003e 100644
--- a/src/api/bot/core.ts
+++ b/src/api/bot/core.ts
@@ -225,7 +225,7 @@ class SigninContext extends Context {
}
} else {
// Compare password
- const same = await bcrypt.compare(query, this.temporaryUser.password);
+ const same = await bcrypt.compare(query, this.temporaryUser.account.password);
if (same) {
this.bot.signin(this.temporaryUser);
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
}
}