@@ -32,10 +32,21 @@ class SubRoom(VariableClass['SubRoomResponse']):
3232 max_players : int
3333 #: This is the visibilty of the image which has the possible value of ``['Private', 'Public', 'Unlisted']``.
3434 accessibility : str
35+ #: The blob that contains the data
3536 data_blob : Optional [str ]
37+ #: The user who saved the last
3638 data_saved_at : Optional [int ]
39+ #: The latest save description for the subroom
40+ description : Optional [str ]
3741
3842 def __init__ (self , data : 'SubRoomResponse' ):
43+ if data .get ("CurrentSave" ):
44+ description = data ["CurrentSave" ].get ("Description" )
45+ saved_at = date_to_unix (data ["CurrentSave" ]["CreatedAt" ])
46+ saved_by = data ["CurrentSave" ].get ("SavedByAccountId" , 1 )
47+ else :
48+ saved_at , saved_by , description = None , 1 , None
49+
3950 self .supports_join_in_progress = data ['SupportsJoinInProgress' ]
4051 self .use_level_based_matchmaking = data ['UseLevelBasedMatchmaking' ]
4152 self .use_age_based_matchmaking = data ['UseAgeBasedMatchmaking' ]
@@ -45,7 +56,9 @@ def __init__(self, data: 'SubRoomResponse'):
4556 self .unity_scene_id = data ['UnitySceneId' ]
4657 self .name = data ['Name' ]
4758 self .data_blob = data .get ("DataBlob" , None )
48- self .data_saved_at = date_to_unix (data ['DataSavedAt' ]) if 'DataSavedAt' in data else None
59+ self .data_saved_at = saved_at
60+ self .data_saved_by = saved_by
61+ self .description = description
4962 self .is_sandbox = data ['IsSandbox' ]
5063 self .max_players = data ['MaxPlayers' ]
5164 self .accessibility = ACCESSIBILITY_DICT .get (data ['Accessibility' ])
0 commit comments