diff --git a/apps/room/server/room_service.go b/apps/room/server/room_service.go index 98d4e114a..dd8a5d648 100644 --- a/apps/room/server/room_service.go +++ b/apps/room/server/room_service.go @@ -227,6 +227,8 @@ func (s *RoomService) AddPeer(ctx context.Context, in *room.AddPeerRequest) (*ro role := in.Peer.Role.String() protocol := in.Peer.Protocol.String() direction := in.Peer.Direction.String() + avatar := in.Peer.Avatar + extraInfo := in.Peer.ExtraInfo // check room exist key := util.GetRedisRoomKey(sid) @@ -273,7 +275,8 @@ func (s *RoomService) AddPeer(ctx context.Context, in *room.AddPeerRequest) (*ro // store peer to redis key = util.GetRedisPeerKey(sid, uid) err := s.redis.HMSetTTL(roomRedisExpire, key, "sid", sid, "uid", uid, "dest", dest, - "name", name, "role", role, "protocol", protocol, "direction", direction) + "name", name, "role", role, "protocol", protocol, "direction", direction, + "avatar", avatar, "info", extraInfo) if err != nil { return &room.AddPeerReply{ @@ -308,6 +311,9 @@ func (s *RoomService) UpdatePeer(ctx context.Context, in *room.UpdatePeerRequest role := in.Peer.Role.String() protocol := in.Peer.Protocol.String() direction := in.Peer.Direction.String() + avatar := in.Peer.Avatar + extraInfo := in.Peer.ExtraInfo + // check room exist key := util.GetRedisRoomKey(sid) @@ -359,7 +365,7 @@ func (s *RoomService) UpdatePeer(ctx context.Context, in *room.UpdatePeerRequest key = util.GetRedisPeerKey(sid, uid) err := s.redis.HMSetTTL(roomRedisExpire, key, "sid", sid, "uid", uid, "destination", destination, - "name", name, "role", role, "protocol", protocol, "direction", direction) + "name", name, "role", role, "protocol", protocol, "direction", direction,"avatar", avatar, "info", extraInfo ) if err != nil { return &room.UpdatePeerReply{