summaryrefslogtreecommitdiff
path: root/src/server/api/bot
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-04-08 03:58:11 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-04-08 03:58:11 +0900
commita02ee3a08bac55c9f0b29cb6bc0a15726b7cc3c8 (patch)
treebf3c3dacd69737bf79eea0311fed1ddc504b15a5 /src/server/api/bot
parentPost --> Note (diff)
downloadsharkey-a02ee3a08bac55c9f0b29cb6bc0a15726b7cc3c8.tar.gz
sharkey-a02ee3a08bac55c9f0b29cb6bc0a15726b7cc3c8.tar.bz2
sharkey-a02ee3a08bac55c9f0b29cb6bc0a15726b7cc3c8.zip
Some bug fixes
Diffstat (limited to 'src/server/api/bot')
-rw-r--r--src/server/api/bot/core.ts2
-rw-r--r--src/server/api/bot/interfaces/line.ts10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/server/api/bot/core.ts b/src/server/api/bot/core.ts
index 1cf0522349..d41af48057 100644
--- a/src/server/api/bot/core.ts
+++ b/src/server/api/bot/core.ts
@@ -226,7 +226,7 @@ class SigninContext extends Context {
}
} else {
// Compare password
- const same = await bcrypt.compare(query, this.temporaryUser.account.password);
+ const same = await bcrypt.compare(query, this.temporaryUser.password);
if (same) {
this.bot.signin(this.temporaryUser);
diff --git a/src/server/api/bot/interfaces/line.ts b/src/server/api/bot/interfaces/line.ts
index b6b0c257e9..be3bfe33d3 100644
--- a/src/server/api/bot/interfaces/line.ts
+++ b/src/server/api/bot/interfaces/line.ts
@@ -112,11 +112,11 @@ class LineBot extends BotCore {
data: `showtl|${user.id}`
});
- if (user.account.twitter) {
+ if (user.twitter) {
actions.push({
type: 'uri',
label: 'Twitterアカウントを見る',
- uri: `https://twitter.com/${user.account.twitter.screenName}`
+ uri: `https://twitter.com/${user.twitter.screenName}`
});
}
@@ -174,7 +174,7 @@ module.exports = async (app: express.Application) => {
if (session == null) {
const user = await User.findOne({
host: null,
- 'account.line': {
+ 'line': {
userId: sourceId
}
});
@@ -184,7 +184,7 @@ module.exports = async (app: express.Application) => {
bot.on('signin', user => {
User.update(user._id, {
$set: {
- 'account.line': {
+ 'line': {
userId: sourceId
}
}
@@ -194,7 +194,7 @@ module.exports = async (app: express.Application) => {
bot.on('signout', user => {
User.update(user._id, {
$set: {
- 'account.line': {
+ 'line': {
userId: null
}
}