mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 15:14:56 -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
|
@ -11,10 +11,14 @@ import type { RealtimeUser } from '@hedgedoc/commons'
|
|||
/**
|
||||
* Dispatches an event to add a user
|
||||
*/
|
||||
export const setRealtimeUsers = (users: RealtimeUser[]): void => {
|
||||
export const setRealtimeUsers = (users: RealtimeUser[], ownStyleIndex: number, ownDisplayName: string): void => {
|
||||
const action: SetRealtimeUsersAction = {
|
||||
type: RealtimeStatusActionType.SET_REALTIME_USERS,
|
||||
users
|
||||
users,
|
||||
ownUser: {
|
||||
styleIndex: ownStyleIndex,
|
||||
displayName: ownDisplayName
|
||||
}
|
||||
}
|
||||
store.dispatch(action)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue