summaryrefslogtreecommitdiff
path: root/src/api/common/read-messaging-message.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2018-03-28 17:05:36 +0900
committerGitHub <noreply@github.com>2018-03-28 17:05:36 +0900
commit46e530ef41bb640cfa66438e888d1ecd6f90f6bb (patch)
treea23eefae5e437ad6adc7dfe190daba81138aa70b /src/api/common/read-messaging-message.ts
parent#1294 (diff)
parentoops (diff)
downloadsharkey-46e530ef41bb640cfa66438e888d1ecd6f90f6bb.tar.gz
sharkey-46e530ef41bb640cfa66438e888d1ecd6f90f6bb.tar.bz2
sharkey-46e530ef41bb640cfa66438e888d1ecd6f90f6bb.zip
Merge pull request #1324 from syuilo/#1288-2
snake_case を camelCase にするなどした
Diffstat (limited to 'src/api/common/read-messaging-message.ts')
-rw-r--r--src/api/common/read-messaging-message.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/api/common/read-messaging-message.ts b/src/api/common/read-messaging-message.ts
index 8e5e5b2b68..9047edec8c 100644
--- a/src/api/common/read-messaging-message.ts
+++ b/src/api/common/read-messaging-message.ts
@@ -37,12 +37,12 @@ export default (
// Update documents
await Message.update({
_id: { $in: ids },
- user_id: otherpartyId,
- recipient_id: userId,
- is_read: false
+ userId: otherpartyId,
+ recipientId: userId,
+ isRead: false
}, {
$set: {
- is_read: true
+ isRead: true
}
}, {
multi: true
@@ -55,8 +55,8 @@ export default (
// Calc count of my unread messages
const count = await Message
.count({
- recipient_id: userId,
- is_read: false
+ recipientId: userId,
+ isRead: false
});
if (count == 0) {