remove getAllPrivateConversations

pull/1321/head
Audric Ackermann 5 years ago
parent 252c45f635
commit c35e1008a5
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -110,7 +110,6 @@ module.exports = {
getPublicConversationsByServer, getPublicConversationsByServer,
getPubkeysInPublicConversation, getPubkeysInPublicConversation,
getAllConversationIds, getAllConversationIds,
getAllPrivateConversations,
getAllGroupsInvolvingId, getAllGroupsInvolvingId,
removeAllConversations, removeAllConversations,
removeAllPrivateConversations, removeAllPrivateConversations,
@ -1948,16 +1947,6 @@ async function getAllConversationIds() {
return map(rows, row => row.id); return map(rows, row => row.id);
} }
async function getAllPrivateConversations() {
const rows = await db.all(
`SELECT json FROM ${CONVERSATIONS_TABLE} WHERE
type = 'private'
ORDER BY id ASC;`
);
return map(rows, row => jsonToObject(row.json));
}
async function getAllPublicConversations() { async function getAllPublicConversations() {
const rows = await db.all( const rows = await db.all(
`SELECT json FROM conversations WHERE `SELECT json FROM conversations WHERE

@ -197,7 +197,6 @@ export function getAllConversations({
}): Promise<Array<ConversationCollection>>; }): Promise<Array<ConversationCollection>>;
export function getAllConversationIds(): Promise<Array<string>>; export function getAllConversationIds(): Promise<Array<string>>;
export function getAllPrivateConversations(): Promise<Array<string>>;
export function getAllPublicConversations(): Promise<Array<string>>; export function getAllPublicConversations(): Promise<Array<string>>;
export function getPublicConversationsByServer( export function getPublicConversationsByServer(
server: string, server: string,

@ -123,7 +123,6 @@ module.exports = {
getAllConversations, getAllConversations,
getAllConversationIds, getAllConversationIds,
getAllPrivateConversations,
getAllPublicConversations, getAllPublicConversations,
getPublicConversationsByServer, getPublicConversationsByServer,
getPubkeysInPublicConversation, getPubkeysInPublicConversation,
@ -819,14 +818,6 @@ async function getAllPublicConversations({ ConversationCollection }) {
return collection; return collection;
} }
async function getAllPrivateConversations({ ConversationCollection }) {
const conversations = await channels.getAllPrivateConversations();
const collection = new ConversationCollection();
collection.add(conversations);
return collection;
}
async function getPubkeysInPublicConversation(id) { async function getPubkeysInPublicConversation(id) {
return channels.getPubkeysInPublicConversation(id); return channels.getPubkeysInPublicConversation(id);
} }

Loading…
Cancel
Save