mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-17 08:34:54 -04:00
feat: submit own style index on realtime user state set
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
b538c2c2a3
commit
24b7514e25
8 changed files with 157 additions and 91 deletions
|
@ -94,13 +94,21 @@ export class RealtimeUserStatusAdapter {
|
|||
}
|
||||
|
||||
private sendCompleteStateToClient(client: RealtimeConnection): void {
|
||||
const payload = this.collectAllConnectionsExcept(client).map(
|
||||
const realtimeUsers = this.collectAllConnectionsExcept(client).map(
|
||||
(client) => client.getRealtimeUserStateAdapter().realtimeUser,
|
||||
);
|
||||
|
||||
client.getTransporter().sendMessage({
|
||||
type: MessageType.REALTIME_USER_STATE_SET,
|
||||
payload,
|
||||
payload: {
|
||||
users: realtimeUsers,
|
||||
ownUser: {
|
||||
displayName:
|
||||
client.getRealtimeUserStateAdapter().realtimeUser.displayName,
|
||||
styleIndex:
|
||||
client.getRealtimeUserStateAdapter().realtimeUser.styleIndex,
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue