Fossil SCM
Improved comments on the new chat-timeline-user feature.
Commit
c3ed2430cc568cc22dd6175a2f015b017a59792e1f52b74de982e122c87a0a45
Parent
974cf3667c4f741…
2 files changed
+4
-2
+2
-1
+4
-2
| --- src/alerts.c | ||
| +++ src/alerts.c | ||
| @@ -142,11 +142,11 @@ | ||
| 142 | 142 | " ADD COLUMN sentMod BOOLEAN DEFAULT false;" |
| 143 | 143 | ); |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | /* |
| 147 | -** Process deferred alert events | |
| 147 | +** Process deferred alert events. Return the number of errors. | |
| 148 | 148 | */ |
| 149 | 149 | static int alert_process_deferred_triggers(void){ |
| 150 | 150 | if( db_table_exists("temp","deferred_chat_events") |
| 151 | 151 | && db_table_exists("repository","chat") |
| 152 | 152 | ){ |
| @@ -185,11 +185,13 @@ | ||
| 185 | 185 | && db_get("chat-timeline-user", "")[0]!=0 |
| 186 | 186 | ){ |
| 187 | 187 | /* Record events that will be relayed to chat, but do not relay |
| 188 | 188 | ** them immediately, as the chat_msg_from_event() function requires |
| 189 | 189 | ** that TAGXREF be up-to-date, and that has not happened yet when |
| 190 | - ** the insert into the EVENT table occurs. */ | |
| 190 | + ** the insert into the EVENT table occurs. Make arrangements to | |
| 191 | + ** invoke alert_process_deferred_triggers() when the transaction | |
| 192 | + ** commits. The TAGXREF table will be ready by then. */ | |
| 191 | 193 | db_multi_exec( |
| 192 | 194 | "CREATE TABLE temp.deferred_chat_events(\n" |
| 193 | 195 | " type TEXT,\n" |
| 194 | 196 | " objid INT,\n" |
| 195 | 197 | " user TEXT,\n" |
| 196 | 198 |
| --- src/alerts.c | |
| +++ src/alerts.c | |
| @@ -142,11 +142,11 @@ | |
| 142 | " ADD COLUMN sentMod BOOLEAN DEFAULT false;" |
| 143 | ); |
| 144 | } |
| 145 | |
| 146 | /* |
| 147 | ** Process deferred alert events |
| 148 | */ |
| 149 | static int alert_process_deferred_triggers(void){ |
| 150 | if( db_table_exists("temp","deferred_chat_events") |
| 151 | && db_table_exists("repository","chat") |
| 152 | ){ |
| @@ -185,11 +185,13 @@ | |
| 185 | && db_get("chat-timeline-user", "")[0]!=0 |
| 186 | ){ |
| 187 | /* Record events that will be relayed to chat, but do not relay |
| 188 | ** them immediately, as the chat_msg_from_event() function requires |
| 189 | ** that TAGXREF be up-to-date, and that has not happened yet when |
| 190 | ** the insert into the EVENT table occurs. */ |
| 191 | db_multi_exec( |
| 192 | "CREATE TABLE temp.deferred_chat_events(\n" |
| 193 | " type TEXT,\n" |
| 194 | " objid INT,\n" |
| 195 | " user TEXT,\n" |
| 196 |
| --- src/alerts.c | |
| +++ src/alerts.c | |
| @@ -142,11 +142,11 @@ | |
| 142 | " ADD COLUMN sentMod BOOLEAN DEFAULT false;" |
| 143 | ); |
| 144 | } |
| 145 | |
| 146 | /* |
| 147 | ** Process deferred alert events. Return the number of errors. |
| 148 | */ |
| 149 | static int alert_process_deferred_triggers(void){ |
| 150 | if( db_table_exists("temp","deferred_chat_events") |
| 151 | && db_table_exists("repository","chat") |
| 152 | ){ |
| @@ -185,11 +185,13 @@ | |
| 185 | && db_get("chat-timeline-user", "")[0]!=0 |
| 186 | ){ |
| 187 | /* Record events that will be relayed to chat, but do not relay |
| 188 | ** them immediately, as the chat_msg_from_event() function requires |
| 189 | ** that TAGXREF be up-to-date, and that has not happened yet when |
| 190 | ** the insert into the EVENT table occurs. Make arrangements to |
| 191 | ** invoke alert_process_deferred_triggers() when the transaction |
| 192 | ** commits. The TAGXREF table will be ready by then. */ |
| 193 | db_multi_exec( |
| 194 | "CREATE TABLE temp.deferred_chat_events(\n" |
| 195 | " type TEXT,\n" |
| 196 | " objid INT,\n" |
| 197 | " user TEXT,\n" |
| 198 |
+2
-1
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -1356,11 +1356,12 @@ | ||
| 1356 | 1356 | @ <hr /> |
| 1357 | 1357 | entry_attribute("Chat Timeline Robot Username", 15, |
| 1358 | 1358 | "chat-timeline-user", "chatrobot", "", 0); |
| 1359 | 1359 | @ <p>If this setting is not an empty string, then any changes that appear |
| 1360 | 1360 | @ on the timeline are announced in the chatroom under the username |
| 1361 | - @ supplied. That user does not need to actually exist in the USER table. | |
| 1361 | + @ supplied. The username does not need to actually exist in the USER table. | |
| 1362 | + @ Suggested username: "chat-robot". | |
| 1362 | 1363 | @ (Property: "chat-timeline-user")</p> |
| 1363 | 1364 | @ <hr /> |
| 1364 | 1365 | |
| 1365 | 1366 | multiple_choice_attribute("Alert sound", |
| 1366 | 1367 | "chat-alert-sound", "snd", azAlerts[0], |
| 1367 | 1368 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1356,11 +1356,12 @@ | |
| 1356 | @ <hr /> |
| 1357 | entry_attribute("Chat Timeline Robot Username", 15, |
| 1358 | "chat-timeline-user", "chatrobot", "", 0); |
| 1359 | @ <p>If this setting is not an empty string, then any changes that appear |
| 1360 | @ on the timeline are announced in the chatroom under the username |
| 1361 | @ supplied. That user does not need to actually exist in the USER table. |
| 1362 | @ (Property: "chat-timeline-user")</p> |
| 1363 | @ <hr /> |
| 1364 | |
| 1365 | multiple_choice_attribute("Alert sound", |
| 1366 | "chat-alert-sound", "snd", azAlerts[0], |
| 1367 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1356,11 +1356,12 @@ | |
| 1356 | @ <hr /> |
| 1357 | entry_attribute("Chat Timeline Robot Username", 15, |
| 1358 | "chat-timeline-user", "chatrobot", "", 0); |
| 1359 | @ <p>If this setting is not an empty string, then any changes that appear |
| 1360 | @ on the timeline are announced in the chatroom under the username |
| 1361 | @ supplied. The username does not need to actually exist in the USER table. |
| 1362 | @ Suggested username: "chat-robot". |
| 1363 | @ (Property: "chat-timeline-user")</p> |
| 1364 | @ <hr /> |
| 1365 | |
| 1366 | multiple_choice_attribute("Alert sound", |
| 1367 | "chat-alert-sound", "snd", azAlerts[0], |
| 1368 |