mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-10 03:53:26 -08:00
[Server] Expose chat-log reads on the database interface (#7830)
getMessageLogHistory, getPrivateChatHistory, and getUserIdInDB were reachable only through Servatrice_DatabaseInterface, so the two log-history commands in the socket handler needed the concrete class. Declare the two readers on Server_DatabaseInterface with empty/false defaults, mark the Servatrice implementations as overrides, and resolve the private-chat peer through the already-promoted getUserId.
This commit is contained in:
parent
2ca3117765
commit
28f92ac5f5
3 changed files with 36 additions and 7 deletions
|
|
@ -230,7 +230,7 @@ public:
|
|||
int &maxresults,
|
||||
int offset = 0,
|
||||
const QString &beforeTime = QString(),
|
||||
bool *hasMore = nullptr);
|
||||
bool *hasMore = nullptr) override;
|
||||
QList<ServerInfo_UserSession> getUserSessions(const QString &userName, int limit) override;
|
||||
bool getPrivateChatHistory(int callerId,
|
||||
const QString &callerName,
|
||||
|
|
@ -239,7 +239,7 @@ public:
|
|||
quint64 before,
|
||||
int limit,
|
||||
QList<ServerInfo_PrivateChatMessage> &messages,
|
||||
bool &hasMore);
|
||||
bool &hasMore) override;
|
||||
QList<ServerInfo_UserAlt> getUserAlts(const QString &userName,
|
||||
int depth = 1,
|
||||
bool useEmail = true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue