File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,13 +43,25 @@ public Context(JObject jobj)
4343 }
4444 if ( jobj [ "instructor" ] != null )
4545 {
46- // TODO: can be Group?
47- instructor = ( Agent ) jobj . Value < JObject > ( "instructor" ) ;
46+ if ( jobj [ "instructor" ] [ "objectType" ] != null && ( String ) jobj [ "instructor" ] [ "objectType" ] == Group . OBJECT_TYPE )
47+ {
48+ instructor = ( Group ) jobj . Value < JObject > ( "instructor" ) ;
49+ }
50+ else
51+ {
52+ instructor = ( Agent ) jobj . Value < JObject > ( "instructor" ) ;
53+ }
4854 }
4955 if ( jobj [ "team" ] != null )
5056 {
51- // TODO: can be Group?
52- team = ( Agent ) jobj . Value < JObject > ( "team" ) ;
57+ if ( jobj [ "team" ] [ "objectType" ] != null && ( String ) jobj [ "team" ] [ "objectType" ] == Group . OBJECT_TYPE )
58+ {
59+ team = ( Group ) jobj . Value < JObject > ( "team" ) ;
60+ }
61+ else
62+ {
63+ team = ( Agent ) jobj . Value < JObject > ( "team" ) ;
64+ }
5365 }
5466 if ( jobj [ "contextActivities" ] != null )
5567 {
You can’t perform that action at this time.
0 commit comments