Remove unused `getAllPrivateConversations` SQL function

This commit is contained in:
Evan Hahn 2021-12-10 17:15:00 -06:00 committed by GitHub
parent 0e3d12c457
commit ebcd3e3e43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 23 deletions

View File

@ -205,7 +205,6 @@ const dataInterface: ClientInterface = {
getAllConversations,
getAllConversationIds,
getAllPrivateConversations,
getAllGroupsInvolvingUuid,
searchConversations,
@ -1024,10 +1023,6 @@ async function getAllConversationIds() {
return ids;
}
async function getAllPrivateConversations() {
return channels.getAllPrivateConversations();
}
async function getAllGroupsInvolvingUuid(uuid: UUIDStringType) {
return channels.getAllGroupsInvolvingUuid(uuid);
}

View File

@ -357,7 +357,6 @@ export type DataInterface = {
getAllConversations: () => Promise<Array<ConversationType>>;
getAllConversationIds: () => Promise<Array<string>>;
getAllPrivateConversations: () => Promise<Array<ConversationType>>;
getAllGroupsInvolvingUuid: (
id: UUIDStringType
) => Promise<Array<ConversationType>>;

View File

@ -201,7 +201,6 @@ const dataInterface: ServerInterface = {
getAllConversations,
getAllConversationIds,
getAllPrivateConversations,
getAllGroupsInvolvingUuid,
searchConversations,
@ -1491,22 +1490,6 @@ async function getAllConversationIds(): Promise<Array<string>> {
return rows.map(row => row.id);
}
async function getAllPrivateConversations(): Promise<Array<ConversationType>> {
const db = getInstance();
const rows: ConversationRows = db
.prepare<EmptyQuery>(
`
SELECT json, profileLastFetchedAt
FROM conversations
WHERE type = 'private'
ORDER BY id ASC;
`
)
.all();
return rows.map(row => rowToConversation(row));
}
async function getAllGroupsInvolvingUuid(
uuid: UUIDStringType
): Promise<Array<ConversationType>> {