forked from FoundKeyGang/FoundKey
add streaming events for renotemuting and blocking
This commit is contained in:
parent
3d9df839a5
commit
dd5100d124
6 changed files with 25 additions and 4 deletions
|
@ -87,4 +87,6 @@ export default define(meta, paramDef, async (ps, user) => {
|
|||
return await Users.pack(blockee.id, blocker, {
|
||||
detail: true,
|
||||
});
|
||||
|
||||
publishUserEvent(user.id, 'block', blockee);
|
||||
});
|
||||
|
|
|
@ -83,4 +83,6 @@ export default define(meta, paramDef, async (ps, user) => {
|
|||
return await Users.pack(blockee.id, blocker, {
|
||||
detail: true,
|
||||
});
|
||||
|
||||
publishUserEvent(user.id, 'unblock', blockee);
|
||||
});
|
||||
|
|
|
@ -74,5 +74,5 @@ export default define(meta, paramDef, async (ps, user) => {
|
|||
muteeId: mutee.id,
|
||||
} as RenoteMuting);
|
||||
|
||||
// publishUserEvent(user.id, 'mute', mutee);
|
||||
publishUserEvent(user.id, 'muteRenote', mutee);
|
||||
});
|
||||
|
|
|
@ -69,5 +69,5 @@ export default define(meta, paramDef, async (ps, user) => {
|
|||
id: exist.id,
|
||||
});
|
||||
|
||||
// publishUserEvent(user.id, 'unmute', mutee);
|
||||
publishUserEvent(user.id, 'unmuteRenote', mutee);
|
||||
});
|
||||
|
|
|
@ -84,8 +84,21 @@ export default class Connection {
|
|||
this.muting.delete(data.body.id);
|
||||
break;
|
||||
|
||||
// TODO: renote mute events
|
||||
// TODO: block events
|
||||
case 'block':
|
||||
this.blocking.add(data.body.id);
|
||||
break;
|
||||
|
||||
case 'unblock':
|
||||
this.blocking.delete(data.body.id);
|
||||
break;
|
||||
|
||||
case 'muteRenote':
|
||||
this.renoteMuting.add(data.body.id);
|
||||
break;
|
||||
|
||||
case 'unmuteRenote':
|
||||
this.renoteMuting.delete(data.body.id);
|
||||
break;
|
||||
|
||||
case 'followChannel':
|
||||
this.followingChannels.add(data.body.id);
|
||||
|
|
|
@ -44,6 +44,10 @@ export interface UserStreamTypes {
|
|||
updateUserProfile: UserProfile;
|
||||
mute: User;
|
||||
unmute: User;
|
||||
muteRenote: User;
|
||||
unmuteRenote: User;
|
||||
block: User;
|
||||
unblock: User;
|
||||
follow: Packed<'UserDetailedNotMe'>;
|
||||
unfollow: Packed<'User'>;
|
||||
userAdded: Packed<'User'>;
|
||||
|
|
Loading…
Reference in a new issue