Files
bunny-bot/internal/elog/retraction.go
eleksir 0c34b6e781 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
2026-10-20 12:20:16 +03:00

25 lines
846 B
Go

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: */