diff --git a/lib/livekit/access_token.rb b/lib/livekit/access_token.rb index bd9ddd0..3398e36 100644 --- a/lib/livekit/access_token.rb +++ b/lib/livekit/access_token.rb @@ -35,6 +35,10 @@ def add_grant(video_grant) if video_grant.is_a?(Hash) video_grant = VideoGrant.from_hash(video_grant) end + self.set_video_grant(video_grant) + end + + def set_video_grant(video_grant) @grants.video = video_grant end @@ -42,6 +46,10 @@ def add_sip_grant(sip_grant) if sip_grant.is_a?(Hash) sip_grant = SIPGrant.from_hash(sip_grant) end + self.set_sip_grant(sip_grant) + end + + def set_sip_grant(sip_grant) @grants.sip = sip_grant end @@ -49,6 +57,10 @@ def metadata=(participant_md) @grants.metadata = participant_md end + def attributes=(participant_attributes) + @grants.attributes = participant_attributes + end + def name=(participant_name) @grants.name = participant_name end