File tree 2 files changed +11
-1
lines changed
packages/jupyterlab-collaborative-chat/src
python/jupyterlab-collaborative-chat/jupyterlab_collaborative_chat
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,16 @@ export class YChat extends YDocument<IChatChanges> {
137
137
} ) ;
138
138
}
139
139
140
+ getMetadata ( key : string ) : IMetadata | undefined {
141
+ return this . _metadata . get ( key ) ;
142
+ }
143
+
144
+ setMetadata ( key : string , value : PartialJSONValue ) {
145
+ this . transact ( ( ) => {
146
+ this . _metadata . set ( key , value ) ;
147
+ } ) ;
148
+ }
149
+
140
150
private _usersObserver = ( event : Y . YMapEvent < IUser > ) : void => {
141
151
const userChange = new Array < UserChange > ( ) ;
142
152
event . keysChanged . forEach ( key => {
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ def get_metadata(self) -> dict[str, dict]:
149
149
"""
150
150
return self ._ymetadata .to_py ()
151
151
152
- def set_metadata (self , name : str , metadata : dict ):
152
+ def set_metadata (self , name : str , metadata : Any ):
153
153
"""
154
154
Adds or modifies a metadata of the document.
155
155
"""
You can’t perform that action at this time.
0 commit comments