@@ -40,11 +40,11 @@ func (r *Repository) AddParticipantToRoomState(room *livekit.Room, participant *
4040 if roomState .RoomID .String () == room .Name {
4141 t := time .Unix (participant .JoinedAt , 0 ).In (time .FixedZone ("Asia/Tokyo" , 9 * 60 * 60 ))
4242 r .RoomState [i ].Participants = append (r .RoomState [i ].Participants , Participant {
43- Identity : & participant .Identity ,
44- JoinedAt : & t ,
45- Name : & participant .Name ,
43+ Identity : participant .Identity ,
44+ JoinedAt : t ,
45+ Name : participant .Name ,
4646 Attributes : & participant .Attributes ,
47- CanPublish : & participant .Permission .CanPublish ,
47+ CanPublish : participant .Permission .CanPublish ,
4848 })
4949
5050 if r .Hub != nil {
@@ -66,8 +66,8 @@ func (r *Repository) UpdateParticipantCanPublish(roomID string, participantID st
6666 for i , roomState := range r .RoomState {
6767 if roomState .RoomID .String () == roomID {
6868 for j , participant := range roomState .Participants {
69- if * participant .Identity == participantID {
70- r .RoomState [i ].Participants [j ].CanPublish = & canPublish
69+ if participant .Identity == participantID {
70+ r .RoomState [i ].Participants [j ].CanPublish = canPublish
7171
7272 if r .Hub != nil {
7373 r .Hub .Publish (hub.Message {
@@ -91,14 +91,14 @@ func (r *Repository) UpdateParticipant(roomID string, participant *livekit.Parti
9191 for i , roomState := range r .RoomState {
9292 if roomState .RoomID .String () == roomID {
9393 for j , p := range roomState .Participants {
94- if * p .Identity == participant .Identity {
94+ if p .Identity == participant .Identity {
9595 t := time .Unix (participant .JoinedAt , 0 ).In (time .FixedZone ("Asia/Tokyo" , 9 * 60 * 60 ))
9696 r .RoomState [i ].Participants [j ] = Participant {
97- Identity : & participant .Identity ,
98- JoinedAt : & t ,
99- Name : & participant .Name ,
97+ Identity : participant .Identity ,
98+ JoinedAt : t ,
99+ Name : participant .Name ,
100100 Attributes : & participant .Attributes ,
101- CanPublish : & participant .Permission .CanPublish ,
101+ CanPublish : participant .Permission .CanPublish ,
102102 }
103103
104104 if r .Hub != nil {
@@ -123,7 +123,7 @@ func (r *Repository) RemoveParticipant(roomID string, participantID string) {
123123 for i , roomState := range r .RoomState {
124124 if roomState .RoomID .String () == roomID {
125125 for j , participant := range roomState .Participants {
126- if * participant .Identity == participantID {
126+ if participant .Identity == participantID {
127127 r .RoomState [i ].Participants = slices .Delete (r .RoomState [i ].Participants , j , j + 1 )
128128
129129 if r .Hub != nil {
@@ -244,9 +244,9 @@ func (r *Repository) GetRoomsWithParticipantsByLiveKitServer(ctx context.Context
244244 for _ , p := range partResp .Participants {
245245 t := time .Unix (p .JoinedAt , 0 ).In (time .FixedZone ("Asia/Tokyo" , 9 * 60 * 60 ))
246246 Participants = append (Participants , Participant {
247- Identity : & p .Identity ,
248- JoinedAt : & t ,
249- Name : & p .Name ,
247+ Identity : p .Identity ,
248+ JoinedAt : t ,
249+ Name : p .Name ,
250250 Attributes : & p .Attributes ,
251251 })
252252 }
@@ -265,7 +265,7 @@ func (r *Repository) GetRoomsWithParticipantsByLiveKitServer(ctx context.Context
265265
266266 roomWithParticipants = append (roomWithParticipants , RoomWithParticipants {
267267 Metadata : & metadata .Status ,
268- IsWebinar : & metadata .IsWebinar ,
268+ IsWebinar : metadata .IsWebinar ,
269269 RoomID : roomID ,
270270 Participants : Participants ,
271271 })
0 commit comments