mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
feat(db): chat log guild, team and filter result; chat flags
chat_log gets guild_id, team_id and filtered (migrations mysql 100, sqlite 83), and the chat log queries take a time range, a guild, a team, a conversation between two characters and paging back by id. Whispers are their own visibility switch (includeWhispers), apart from team and guild chat (includePrivate). Whisper partners and teams that talked are listed with counts. chat_flags, chat_flag_messages and chat_flag_events (mysql 101, sqlite 84) hold flagged chat with a copy of the messages around it, its status, note, linked player report and history. Open flags are in the dashboard snapshot. Tests on SQLite alone (dDatabaseSqliteTests) and in the MySQL parity tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -369,6 +369,18 @@ class TestSQLDatabase : public GameDatabase {
|
||||
uint64_t InsertChatMessage(const ChatMessage& message) override { return 0; }
|
||||
std::vector<ChatMessage> GetChatMessages(const ChatQuery& query) override { return {}; }
|
||||
uint64_t CountChatMessages(const ChatQuery& query) override { return 0; }
|
||||
std::vector<WhisperPartner> GetWhisperPartners(LWOOBJID characterId, uint32_t offset, uint32_t limit) override { return {}; }
|
||||
uint64_t CountWhisperPartners(LWOOBJID characterId) override { return 0; }
|
||||
std::vector<ChatTeam> GetChatTeams(LWOOBJID characterId, uint32_t offset, uint32_t limit) override { return {}; }
|
||||
uint64_t CountChatTeams(LWOOBJID characterId) override { return 0; }
|
||||
uint64_t InsertChatFlag(const ChatFlag& flag, const std::vector<uint64_t>& messageIds) override { return 0; }
|
||||
std::optional<ChatFlag> GetChatFlag(uint64_t id) override { return std::nullopt; }
|
||||
std::vector<ChatFlag> GetChatFlags(const ChatFlagQuery& query) override { return {}; }
|
||||
uint64_t CountChatFlags(const ChatFlagQuery& query) override { return 0; }
|
||||
bool UpdateChatFlag(uint64_t id, const std::string& status, const std::string& note, uint64_t playerReportId, int64_t time, const std::string& updatedBy) override { return false; }
|
||||
void InsertChatFlagEvent(const ChatFlagEvent& event) override {}
|
||||
std::vector<ChatFlagEvent> GetChatFlagEvents(uint64_t flagId) override { return {}; }
|
||||
std::vector<std::pair<uint64_t, uint64_t>> GetFlaggedMessages(const std::vector<uint64_t>& messageIds) override { return {}; }
|
||||
void InsertModerationDecision(const std::string& kind, int64_t subjectId, const std::string& subject, bool approved, const std::string& reason, int64_t time) override {}
|
||||
nlohmann::json GetModerationDecisions(const std::string& kind, int64_t subjectId, uint32_t limit) override { return nlohmann::json::array(); }
|
||||
Totp GetTotp(uint32_t accountId) override { return {}; }
|
||||
|
||||
Reference in New Issue
Block a user