File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ class Rest extends WebService
3232 const POST_USER_MESSAGE_UNREAD = 'user_message_unread ' ;
3333 const SAVE_USER_MESSAGE = 'save_user_message ' ;
3434 const GET_MESSAGE_USERS = 'message_users ' ;
35+ const VIEW_MESSAGE = 'view_message ' ;
3536
3637 const GET_USER_COURSES = 'user_courses ' ;
3738 const GET_USER_SESSIONS = 'user_sessions ' ;
@@ -2925,6 +2926,14 @@ public function viewSurveyTool()
29252926 exit ;
29262927 }
29272928
2929+ public function viewMessage (int $ messageId )
2930+ {
2931+ $ url = api_get_path (WEB_CODE_PATH ).'messages/view_message.php? ' .http_build_query (['id ' => $ messageId ]);
2932+
2933+ header ("Location: $ url " );
2934+ exit ;
2935+ }
2936+
29282937 public static function isAllowedByRequest (bool $ inpersonate = false ): bool
29292938 {
29302939 $ username = $ _GET ['username ' ] ?? null ;
Original file line number Diff line number Diff line change 151151 $ data = $ restApi ->getMessageUsers ($ search );
152152 $ restResponse ->setData ($ data );
153153 break ;
154+ case Rest::VIEW_MESSAGE :
155+ $ messageId = isset ($ _GET ['message ' ]) ? (int ) $ _GET ['message ' ] : 0 ;
156+
157+ $ restApi ->viewMessage ($ messageId );
158+ break ;
154159
155160 case Rest::GET_USER_COURSES :
156161 $ userId = isset ($ _REQUEST ['user_id ' ]) ? (int ) $ _REQUEST ['user_id ' ] : 0 ;
You can’t perform that action at this time.
0 commit comments