mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-28 16:38:23 +01:00
✌️
This commit is contained in:
parent
f74f4ffc6a
commit
08576c49de
1 changed files with 9 additions and 9 deletions
|
@ -65,36 +65,36 @@ export default class Connection {
|
||||||
}
|
}
|
||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
private onUserEvent({ type, body }: UserEvent) {
|
private onUserEvent(ev: UserEvent) { // { type, body }と展開すると型も展開されてしまう
|
||||||
switch (type) {
|
switch (ev.type) {
|
||||||
case 'follow':
|
case 'follow':
|
||||||
this.following.add(body.id);
|
this.following.add(ev.body.id);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'unfollow':
|
case 'unfollow':
|
||||||
this.following.delete(body.id);
|
this.following.delete(ev.body.id);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'mute':
|
case 'mute':
|
||||||
this.muting.add(body.id);
|
this.muting.add(ev.body.id);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'unmute':
|
case 'unmute':
|
||||||
this.muting.delete(body.id);
|
this.muting.delete(ev.body.id);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// TODO: block events
|
// TODO: block events
|
||||||
|
|
||||||
case 'followChannel':
|
case 'followChannel':
|
||||||
this.followingChannels.add(body.id);
|
this.followingChannels.add(ev.body.id);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'unfollowChannel':
|
case 'unfollowChannel':
|
||||||
this.followingChannels.delete(body.id);
|
this.followingChannels.delete(ev.body.id);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'updateUserProfile':
|
case 'updateUserProfile':
|
||||||
this.userProfile = body;
|
this.userProfile = ev.body;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'terminate':
|
case 'terminate':
|
||||||
|
|
Loading…
Reference in a new issue