Fossil SCM

The /chat page now redirects to the login page if needed.

drh 2020-12-24 03:34 trunk
Commit 77d30586005fc1207c265a8ff15952b0ea68750df317abe10d71cf89fcc2acd7
1 file changed +2 -6
+2 -6
--- src/chat.c
+++ src/chat.c
@@ -75,19 +75,15 @@
7575
**
7676
** Start up a browser-based chat session.
7777
*/
7878
void chat_webpage(void){
7979
login_check_credentials();
80
- style_set_current_feature("chat");
8180
if( !g.perm.Chat ){
82
- style_header("Chat Not Authorized");
83
- @ <h1>Not Authorized</h1>
84
- @ <p>You do not have permission to use the chatroom on this
85
- @ repository.</p>
86
- style_finish_page();
81
+ login_needed(g.anon.Chat);
8782
return;
8883
}
84
+ style_set_current_feature("chat");
8985
style_header("Chat");
9086
@ <style>
9187
@ #dialog {
9288
@ width: 97%%;
9389
@ }
9490
--- src/chat.c
+++ src/chat.c
@@ -75,19 +75,15 @@
75 **
76 ** Start up a browser-based chat session.
77 */
78 void chat_webpage(void){
79 login_check_credentials();
80 style_set_current_feature("chat");
81 if( !g.perm.Chat ){
82 style_header("Chat Not Authorized");
83 @ <h1>Not Authorized</h1>
84 @ <p>You do not have permission to use the chatroom on this
85 @ repository.</p>
86 style_finish_page();
87 return;
88 }
 
89 style_header("Chat");
90 @ <style>
91 @ #dialog {
92 @ width: 97%%;
93 @ }
94
--- src/chat.c
+++ src/chat.c
@@ -75,19 +75,15 @@
75 **
76 ** Start up a browser-based chat session.
77 */
78 void chat_webpage(void){
79 login_check_credentials();
 
80 if( !g.perm.Chat ){
81 login_needed(g.anon.Chat);
 
 
 
 
82 return;
83 }
84 style_set_current_feature("chat");
85 style_header("Chat");
86 @ <style>
87 @ #dialog {
88 @ width: 97%%;
89 @ }
90

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button