Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Added lmtime value to chat-timeline-user's chat messages, using the server's local time, to fix time display in the /chat message popup. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
e1ad499265a23e434f48abcd34949a9a |
| User & Date: | stephan 2022-09-15 16:58:49.090 |
Context
|
2022-09-15
| ||
| 17:08 | Add the chat-timeline-user setting to the 2.20 change log. ... (check-in: 0efd583a54 user: stephan tags: trunk) | |
| 16:58 | Added lmtime value to chat-timeline-user's chat messages, using the server's local time, to fix time display in the /chat message popup. ... (check-in: e1ad499265 user: stephan tags: trunk) | |
| 15:51 | Improved comments on the new chat-timeline-user feature. ... (check-in: c3ed2430cc user: drh tags: trunk) | |
Changes
Changes to src/alerts.c.
| ︙ | ︙ | |||
149 150 151 152 153 154 155 |
static int alert_process_deferred_triggers(void){
if( db_table_exists("temp","deferred_chat_events")
&& db_table_exists("repository","chat")
){
const char *zChatUser = db_get("chat-timeline-user", 0);
if( zChatUser && zChatUser[0] ){
db_multi_exec(
| | | > > | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
static int alert_process_deferred_triggers(void){
if( db_table_exists("temp","deferred_chat_events")
&& db_table_exists("repository","chat")
){
const char *zChatUser = db_get("chat-timeline-user", 0);
if( zChatUser && zChatUser[0] ){
db_multi_exec(
"INSERT INTO chat(mtime,lmtime,xfrom,xmsg)"
" SELECT julianday(), "
" strftime('%%Y-%%m-%%dT%%H:%%M:%%S','now','localtime'),"
" %Q,"
" chat_msg_from_event(type, objid, user, comment)\n"
" FROM deferred_chat_events;\n",
zChatUser
);
}
}
return 0;
|
| ︙ | ︙ |
Changes to src/chat.c.
| ︙ | ︙ | |||
569 570 571 572 573 574 575 |
int nDelay; /* Maximum delay.*/
const char *zChatUser; /* chat-timeline-user */
int isWiki = 0; /* True if chat message is x-fossil-wiki */
int msgid = atoi(PD("name","0"));
const int msgBefore = atoi(PD("before","0"));
int nLimit = msgBefore>0 ? atoi(PD("n","0")) : 0;
const int bRaw = P("raw")!=0;
| | | 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 |
int nDelay; /* Maximum delay.*/
const char *zChatUser; /* chat-timeline-user */
int isWiki = 0; /* True if chat message is x-fossil-wiki */
int msgid = atoi(PD("name","0"));
const int msgBefore = atoi(PD("before","0"));
int nLimit = msgBefore>0 ? atoi(PD("n","0")) : 0;
const int bRaw = P("raw")!=0;
Blob sql = empty_blob;
Stmt q1;
nDelay = db_get_int("chat-poll-timeout",420); /* Default about 7 minutes */
login_check_credentials();
if( !g.perm.Chat ) {
chat_emit_permissions_error(1);
return;
|
| ︙ | ︙ |