lib/livekit/access_token.rb in livekit-server-sdk-0.7.0 vs lib/livekit/access_token.rb in livekit-server-sdk-0.7.1

- old
+ new

@@ -29,25 +29,39 @@ @grants.attributes = attributes @identity = identity @ttl = ttl end + # Deprecated, use set_video_grant instead 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 + # Deprecated, use set_sip_grant instead 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 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