File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- // TODO: delete/comment this line and use this file to implement a gateway to your group's chat system
4
- return RequestHandler::throwError ('The administrator of this site has not yet implemented a redirect to your chat provider ' );
3
+ if (Laddr::$ chatLinker ) {
4
+ $ url = call_user_func (Laddr::$ chatLinker , !empty ($ _GET ['channel ' ]) ? $ _GET ['channel ' ] : null );
5
+ Site::redirect ($ url );
6
+ }
5
7
6
- // $_GET['channel'] may be provided to indicate a specific channel to redirect to
7
-
8
- // EXAMPLE 1: Redirect to Slack with authentication provided via SAML Single Sign On
9
- //$GLOBALS['Session']->requireAuthentication();
10
- //Site::redirect('https://codeforphilly.slack.com/sso/saml/start?redir=%2Fmessages%2F'.urlencode(!empty($_GET['channel']) ? $_GET['channel'] : 'general').'%2F');
11
-
12
- // EXAMPLE 2: Redirect to Slack without SSO
13
- //Site::redirect('https://codeforphilly.slack.com/messages/'.urlencode(!empty($_GET['channel']) ? $_GET['channel'] : 'general').'/');
8
+ RequestHandler::throwError ('The administrator of this site has not yet configured Laddr:$chatLinker ' );
You can’t perform that action at this time.
0 commit comments