99use PanicHD \PanicHD \Models \Category ;
1010use PanicHD \PanicHD \Models \Comment ;
1111use PanicHD \PanicHD \Models \CommentNotification ;
12- use PanicHD \PanicHD \Models \Member ;
1312use PanicHD \PanicHD \Models \Setting ;
1413use PanicHD \PanicHD \Models \Ticket ;
1514
@@ -145,7 +144,7 @@ public function newComment(Comment $comment, $request)
145144 'notification_type ' => $ comment ->type ,
146145 ];
147146
148- $ member = Member ::find (auth ()->user ()->id );
147+ $ member = \PanicHDMember ::find (auth ()->user ()->id );
149148 $ category_level = $ member ->levelInCategory ($ ticket ->category_id );
150149 $ permission_level = ($ member ->currentLevel () > 1 and $ category_level > 1 ) ? $ category_level : 1 ;
151150
@@ -172,7 +171,7 @@ public function newComment(Comment $comment, $request)
172171
173172 // All previous comments recipients
174173 foreach ($ comm ->notifications as $ notification ) {
175- $ recipient = Member ::find ($ notification ->member_id );
174+ $ recipient = \PanicHDMember ::find ($ notification ->member_id );
176175 if (!is_null ($ recipient ) and ($ comment ->type == 'reply ' or ($ comment ->type != 'reply ' and $ recipient ->levelInCategory ($ ticket ->category ->id ) > 1 ))
177176 and $ notification_owner ->id != $ recipient ->id and !in_array ($ recipient ->id , $ a_recipients )) {
178177 $ a_recipients [] = $ recipient ->id ;
@@ -201,7 +200,7 @@ public function newComment(Comment $comment, $request)
201200
202201 if ($ a_recipients and count ($ a_recipients ) > 0 ) {
203202 foreach ($ a_recipients as $ member_id ) {
204- $ recipient = Member ::find ($ member_id );
203+ $ recipient = \PanicHDMember ::find ($ member_id );
205204 if (!is_null ($ recipient )) {
206205 // Register the notified email
207206 $ notification = CommentNotification::create ([
@@ -246,7 +245,7 @@ public function commentUpdate(Comment $original_comment, Comment $comment)
246245
247246 // Send notification to all comment notified users
248247 foreach ($ comment ->notifications as $ notification ) {
249- $ recipient = Member ::find ($ notification ->member_id );
248+ $ recipient = \PanicHDMember ::find ($ notification ->member_id );
250249 if (!is_null ($ recipient )) {
251250 if ($ recipient ->email != $ notification_owner ->email ) {
252251 $ a_to [] = [
@@ -284,7 +283,7 @@ public function notificationResend(Request $request)
284283 if ($ request ->input ('recipients ' ) != '' ) {
285284 foreach ($ request ->recipients as $ recipient_key ) {
286285 // Search by member_id or by email address
287- $ recipient = Member ::where ('id ' , $ recipient_key )->orWhere ('email ' , $ recipient_key )->first ();
286+ $ recipient = \PanicHDMember ::where ('id ' , $ recipient_key )->orWhere ('email ' , $ recipient_key )->first ();
288287
289288 if (!is_null ($ recipient )) {
290289 $ a_to [] = [
0 commit comments