Global code ovehaul - remove CAS and other, add 15 minute greet check
- Remove CAS, as it no longer works for us - Remove other checks - Implement 15 minute greet timeout check - Fix chat logos - Ditch thirdparty logger, use stdlib log facility wrapper for logging
This commit is contained in:
24
internal/elog/retraction.go
Normal file
24
internal/elog/retraction.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package elog
|
||||
|
||||
import (
|
||||
"github.com/NicoNex/echotron/v3"
|
||||
)
|
||||
|
||||
// LogGreetingRetracted records that we deleted a greeting of our own — one the
|
||||
// addressed member never answered, because they were banned for the silence.
|
||||
//
|
||||
// The log is append-only, so the question's original line stays where it was and
|
||||
// this line says what became of it. A reader must be able to tell that the room
|
||||
// asked a question and later removed it, rather than finding a line that
|
||||
// describes a message which no longer exists.
|
||||
func LogGreetingRetracted(chat *echotron.Chat, user *echotron.User, messageID int) {
|
||||
if _, on := chatLogRoot(); !on || chat == nil {
|
||||
return
|
||||
}
|
||||
|
||||
body := "greeting " + itoaInt(messageID) + " retracted, member banned without answering"
|
||||
|
||||
appendLine(chat.ID, renderLine(*chat, user, body))
|
||||
}
|
||||
|
||||
/* vim: set ft=go noet ai ts=4 sw=4 sts=4: */
|
||||
Reference in New Issue
Block a user