From 08576c49de16435d980a2724e980c138515b578b Mon Sep 17 00:00:00 2001 From: tamaina Date: Mon, 6 Sep 2021 00:11:31 +0900 Subject: [PATCH] :v: --- src/server/api/stream/index.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/server/api/stream/index.ts b/src/server/api/stream/index.ts index e9f5bf9d15..c2f0870f11 100644 --- a/src/server/api/stream/index.ts +++ b/src/server/api/stream/index.ts @@ -65,36 +65,36 @@ export default class Connection { } @autobind - private onUserEvent({ type, body }: UserEvent) { - switch (type) { + private onUserEvent(ev: UserEvent) { // { type, body }と展開すると型も展開されてしまう + switch (ev.type) { case 'follow': - this.following.add(body.id); + this.following.add(ev.body.id); break; case 'unfollow': - this.following.delete(body.id); + this.following.delete(ev.body.id); break; case 'mute': - this.muting.add(body.id); + this.muting.add(ev.body.id); break; case 'unmute': - this.muting.delete(body.id); + this.muting.delete(ev.body.id); break; // TODO: block events case 'followChannel': - this.followingChannels.add(body.id); + this.followingChannels.add(ev.body.id); break; case 'unfollowChannel': - this.followingChannels.delete(body.id); + this.followingChannels.delete(ev.body.id); break; case 'updateUserProfile': - this.userProfile = body; + this.userProfile = ev.body; break; case 'terminate':