summaryrefslogtreecommitdiff
path: root/src/api/bot
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-03-28 16:39:14 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-03-28 16:39:14 +0900
commit3d5cdb8d2d60932caf1d29b0581c7d6243e06e37 (patch)
tree9c29d1062b08378d4c4cafe5976793616d45bc01 /src/api/bot
parentwip (diff)
downloadsharkey-3d5cdb8d2d60932caf1d29b0581c7d6243e06e37.tar.gz
sharkey-3d5cdb8d2d60932caf1d29b0581c7d6243e06e37.tar.bz2
sharkey-3d5cdb8d2d60932caf1d29b0581c7d6243e06e37.zip
wip
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 d6706e9a1c..9e699572de 100644
--- a/src/api/bot/core.ts
+++ b/src/api/bot/core.ts
@@ -208,7 +208,7 @@ class SigninContext extends Context {
if (this.temporaryUser == null) {
// Fetch user
const user: IUser = await User.findOne({
- username_lower: query.toLowerCase(),
+ usernameLower: query.toLowerCase(),
host: null
}, {
fields: {
diff --git a/src/api/bot/interfaces/line.ts b/src/api/bot/interfaces/line.ts
index 8036b2fde4..dc600125c5 100644
--- a/src/api/bot/interfaces/line.ts
+++ b/src/api/bot/interfaces/line.ts
@@ -115,7 +115,7 @@ class LineBot extends BotCore {
actions.push({
type: 'uri',
label: 'Twitterアカウントを見る',
- uri: `https://twitter.com/${user.account.twitter.screen_name}`
+ uri: `https://twitter.com/${user.account.twitter.screenName}`
});
}
@@ -142,7 +142,7 @@ class LineBot extends BotCore {
public async showUserTimelinePostback(userId: string) {
const tl = await require('../../endpoints/users/posts')({
- user_id: userId,
+ userId: userId,
limit: 5
}, this.user);
@@ -174,7 +174,7 @@ module.exports = async (app: express.Application) => {
const user = await User.findOne({
host: null,
'account.line': {
- user_id: sourceId
+ userId: sourceId
}
});
@@ -184,7 +184,7 @@ module.exports = async (app: express.Application) => {
User.update(user._id, {
$set: {
'account.line': {
- user_id: sourceId
+ userId: sourceId
}
}
});
@@ -194,7 +194,7 @@ module.exports = async (app: express.Application) => {
User.update(user._id, {
$set: {
'account.line': {
- user_id: null
+ userId: null
}
}
});