Skip to content
Snippets Groups Projects
Unverified Commit d36a572c authored by Kevin Lyda's avatar Kevin Lyda
Browse files

Permanent messages are permanent...

Sigh.  Boolean errors strike again.
parent 7410cef1
No related branches found
No related tags found
No related merge requests found
...@@ -20,9 +20,6 @@ Switch between MAIL and BULLETIN modes? MAIL commands are documented ...@@ -20,9 +20,6 @@ Switch between MAIL and BULLETIN modes? MAIL commands are documented
## Things to do ## Things to do
* Remove all file related things. Which means no need for most
(all?) /EDIT flags
* Stop the seeded messages from being deleted by the expire batch command.
* Run [godoc](http://localhost:6060/) and then review where the help text is lacking. * Run [godoc](http://localhost:6060/) and then review where the help text is lacking.
* Implement each command. * Implement each command.
* Next: folder commands - MODIFY * Next: folder commands - MODIFY
...@@ -69,6 +66,9 @@ Done: ...@@ -69,6 +66,9 @@ Done:
* ~~Remove BBOARD references.~~ * ~~Remove BBOARD references.~~
* ~~format with `par w72j1`~~ * ~~format with `par w72j1`~~
* ~~Handle MARK for SELECT and DIRECTORY.~~ * ~~Handle MARK for SELECT and DIRECTORY.~~
* ~~Remove all file related things. Which means no need for most
(all?) /EDIT flags~~
* ~~Stop the seeded messages from being deleted by the expire batch command.~~
## Module links ## Module links
......
...@@ -11,7 +11,7 @@ import ( ...@@ -11,7 +11,7 @@ import (
const deleteAllExpiredMessages = `-- name: DeleteAllExpiredMessages :execrows const deleteAllExpiredMessages = `-- name: DeleteAllExpiredMessages :execrows
DELETE FROM messages DELETE FROM messages
WHERE permanent != 0 AND expiration < CURRENT_TIMESTAMP WHERE permanent != 1 AND expiration < CURRENT_TIMESTAMP
` `
func (q *Queries) DeleteAllExpiredMessages(ctx context.Context) (int64, error) { func (q *Queries) DeleteAllExpiredMessages(ctx context.Context) (int64, error) {
...@@ -24,7 +24,7 @@ func (q *Queries) DeleteAllExpiredMessages(ctx context.Context) (int64, error) { ...@@ -24,7 +24,7 @@ func (q *Queries) DeleteAllExpiredMessages(ctx context.Context) (int64, error) {
const deleteAllShutdownMessages = `-- name: DeleteAllShutdownMessages :execrows const deleteAllShutdownMessages = `-- name: DeleteAllShutdownMessages :execrows
DELETE FROM messages DELETE FROM messages
WHERE permanent != 0 AND shutdown > 0 WHERE permanent != 1 AND shutdown > 0
` `
func (q *Queries) DeleteAllShutdownMessages(ctx context.Context) (int64, error) { func (q *Queries) DeleteAllShutdownMessages(ctx context.Context) (int64, error) {
......
-- name: DeleteAllExpiredMessages :execrows -- name: DeleteAllExpiredMessages :execrows
DELETE FROM messages DELETE FROM messages
WHERE permanent != 0 AND expiration < CURRENT_TIMESTAMP; WHERE permanent != 1 AND expiration < CURRENT_TIMESTAMP;
-- name: DeleteAllShutdownMessages :execrows -- name: DeleteAllShutdownMessages :execrows
DELETE FROM messages DELETE FROM messages
WHERE permanent != 0 AND shutdown > 0; WHERE permanent != 1 AND shutdown > 0;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment