PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.8.16
VikBooking Hotel Booking Engine & PMS v1.8.16
1.8.16 1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 All 37 releases
← All changes | admin/helpers/src/chat/mediator.php +16 -2 1.8.13 → 1.8.16 View file →
@@ -62,9 +62,9 @@
62 62
63 63 // create default attachments extension filters
64 64 $this->supportedFiles = implode(',', [
65 65 // images
66 - 'png,apng,bmp,gif,ico,jpg,jpeg,svg,heic,webp',
66 + 'png,apng,bmp,gif,ico,jpg,jpeg,heic,webp',
67 67 // videos
68 68 'mp4,mov,ogm,webm,3gp,asf,avi,divx,flv,mkv,mpg,mpeg,wmv,xvid',
69 69 // audios
70 70 'aac,m4a,mp3,ogg,opus,wav,wave,ac3,aiff,flac,mid,midi,wma',
@@ -94,8 +94,22 @@
94 94 // auto-bind the sender only if not provided
95 95 if (JFactory::getApplication()->isClient('administrator')) {
96 96 // authenticate as administrator
97 97 $user = new VBOChatUserAdmin;
98 + } else if (class_exists('VCMAppFramework') && ($appUser = VCMAppFramework::getUser())) {
99 + /**
100 + * The user authenticated via APP.
101 + * Create a chat account accordingly.
102 + *
103 + * @since 1.18.16 (J) - 1.8.16 (WP)
104 + */
105 + if ($appUser['admin']) {
106 + // authenticate as administrator
107 + $user = new VBOChatUserAdmin(new JUser($appUser['id']));
108 + } else {
109 + // authenticate as operator
110 + $user = new VBOChatUserOperator($appUser['id']);
111 + }
98 112 } else {
99 113 // fetch details of the logged in operator
100 114 $operator = VikBooking::getOperatorInstance()->getOperatorAccount();
101 115
@@ -394,9 +408,9 @@
394 408 if (!class_exists($classname)) {
395 409 throw new RuntimeException('The class [' . $classname . '] does not exist.', 404);
396 410 }
397 411
398 - // instantiate class by inject the provided ID
412 + // instantiate class by injecting the provided ID
399 413 return new $classname($id);
400 414 }
401 415
402 416 /**