summaryrefslogtreecommitdiff
path: root/src/server/api/common
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2018-04-02 17:41:51 +0900
committerGitHub <noreply@github.com>2018-04-02 17:41:51 +0900
commit81af33f8a139191a551c00d14a1f9ba96ec53c10 (patch)
treed529158aa9638032091fa9d0ca17e281cc268895 /src/server/api/common
parentPresent icons (diff)
parentDistribute posts from remote (diff)
downloadmisskey-81af33f8a139191a551c00d14a1f9ba96ec53c10.tar.gz
misskey-81af33f8a139191a551c00d14a1f9ba96ec53c10.tar.bz2
misskey-81af33f8a139191a551c00d14a1f9ba96ec53c10.zip
Merge pull request #1368 from akihikodaki/misc
Distribute posts from remote
Diffstat (limited to 'src/server/api/common')
-rw-r--r--src/server/api/common/watch-post.ts26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/server/api/common/watch-post.ts b/src/server/api/common/watch-post.ts
deleted file mode 100644
index 83c9b94f3e..0000000000
--- a/src/server/api/common/watch-post.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import * as mongodb from 'mongodb';
-import Watching from '../../../models/post-watching';
-
-export default async (me: mongodb.ObjectID, post: object) => {
- // 自分の投稿はwatchできない
- if (me.equals((post as any).userId)) {
- return;
- }
-
- // if watching now
- const exist = await Watching.findOne({
- postId: (post as any)._id,
- userId: me,
- deletedAt: { $exists: false }
- });
-
- if (exist !== null) {
- return;
- }
-
- await Watching.insert({
- createdAt: new Date(),
- postId: (post as any)._id,
- userId: me
- });
-};