This commit is contained in:
syuilo
2018-10-30 14:34:32 +09:00
parent d399241e65
commit 7afa541a53
7 changed files with 31 additions and 29 deletions

View File

@@ -60,7 +60,9 @@ async function cancelRequest(follower: IUser, followee: IUser) {
}
if (isLocalUser(follower)) {
packUser(followee, follower).then(packed => publishMainStream(follower._id, 'unfollow', packed));
packUser(followee, follower, {
detail: true
}).then(packed => publishMainStream(follower._id, 'unfollow', packed));
}
// リモートにフォローリクエストをしていたらUndoFollow送信
@@ -110,7 +112,9 @@ async function unFollow(follower: IUser, followee: IUser) {
// Publish unfollow event
if (isLocalUser(follower)) {
packUser(followee, follower).then(packed => publishMainStream(follower._id, 'unfollow', packed));
packUser(followee, follower, {
detail: true
}).then(packed => publishMainStream(follower._id, 'unfollow', packed));
}
// リモートにフォローをしていたらUndoFollow送信

View File

@@ -87,7 +87,9 @@ export default async function(follower: IUser, followee: IUser, requestId?: stri
// Publish follow event
if (isLocalUser(follower)) {
packUser(followee, follower).then(packed => publishMainStream(follower._id, 'follow', packed));
packUser(followee, follower, {
detail: true
}).then(packed => publishMainStream(follower._id, 'follow', packed));
}
// Publish followed event

View File

@@ -42,7 +42,9 @@ export default async function(follower: IUser, followee: IUser) {
// Publish unfollow event
if (isLocalUser(follower)) {
packUser(followee, follower).then(packed => publishMainStream(follower._id, 'unfollow', packed));
packUser(followee, follower, {
detail: true
}).then(packed => publishMainStream(follower._id, 'unfollow', packed));
}
if (isLocalUser(follower) && isRemoteUser(followee)) {

View File

@@ -70,5 +70,7 @@ export default async function(followee: IUser, follower: IUser) {
detail: true
}).then(packed => publishMainStream(followee._id, 'meUpdated', packed));
packUser(followee, follower).then(packed => publishMainStream(follower._id, 'follow', packed));
packUser(followee, follower, {
detail: true
}).then(packed => publishMainStream(follower._id, 'follow', packed));
}

View File

@@ -28,5 +28,7 @@ export default async function(followee: IUser, follower: IUser) {
}
});
packUser(followee, follower).then(packed => publishMainStream(follower._id, 'unfollow', packed));
packUser(followee, follower, {
detail: true
}).then(packed => publishMainStream(follower._id, 'unfollow', packed));
}