File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
app/components/public/stream Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ export default class JoinVideo extends Component<Args> {
26
26
openPanel ( ) : void {
27
27
if ( this . args . canAccess ) {
28
28
this . args . showSidePanel ?.( ) ;
29
+ this . eventCheckIn ( this . args . event . identifier )
29
30
this . router . transitionTo ( { queryParams : { side_panel : true } } ) ;
30
31
} else {
31
32
if ( this . session . isAuthenticated ) {
@@ -35,4 +36,16 @@ export default class JoinVideo extends Component<Args> {
35
36
}
36
37
}
37
38
}
39
+
40
+ async eventCheckIn ( event_identifier : string ) {
41
+ try {
42
+ const data :any = {
43
+ 'check_in_type' : 'event' ,
44
+ 'is_check_in' : true
45
+ } ;
46
+ await this . loader . post ( `events/${ event_identifier } /virtual/check-in` , data ) ;
47
+ } catch ( e ) {
48
+ // Ignore error to prevent stackoverflow
49
+ }
50
+ }
38
51
}
Original file line number Diff line number Diff line change @@ -170,11 +170,28 @@ export default class PublicStreamVideoStream extends Component<Args> {
170
170
this . selectingLanguage . setName ( null ) ;
171
171
}
172
172
this . selectingLanguage . setTranslationRoomId ( stream . id )
173
+ this . eventCheckIn ( this . args . event . identifier , stream . microlocationId )
173
174
}
174
175
175
176
@action
176
177
hideStreamYard ( ) {
177
178
this . selectingLanguage . setStreamYardVisibility ( false ) ;
178
179
}
179
180
181
+ async eventCheckIn ( event_identifier : string , microlocation_id : number ) {
182
+ try {
183
+ const data :any = {
184
+ 'check_in_type' : 'room' ,
185
+ microlocation_id,
186
+ 'is_check_in' : true
187
+ } ;
188
+ if ( microlocation_id === undefined ) {
189
+ data . check_in_type = 'virtual-room'
190
+ }
191
+ await this . loader . post ( `events/${ event_identifier } /virtual/check-in` , data ) ;
192
+ } catch ( e ) {
193
+ // Ignore error to prevent stackoverflow
194
+ }
195
+ }
196
+
180
197
}
You can’t perform that action at this time.
0 commit comments