mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
Restore contact/conversation differentiation in search results
This commit is contained in:
@@ -15,6 +15,12 @@ import { AttachmentType } from '../../types/Attachment';
|
||||
|
||||
// State
|
||||
|
||||
export type DBConversationType = {
|
||||
id: string;
|
||||
activeAt?: number;
|
||||
lastMessage: string;
|
||||
type: string;
|
||||
};
|
||||
export type ConversationType = {
|
||||
id: string;
|
||||
name?: string;
|
||||
|
||||
@@ -11,8 +11,8 @@ import {
|
||||
import { makeLookup } from '../../util/makeLookup';
|
||||
|
||||
import {
|
||||
ConversationType,
|
||||
ConversationUnloadedActionType,
|
||||
DBConversationType,
|
||||
MessageDeletedActionType,
|
||||
MessageType,
|
||||
RemoveAllConversationsActionType,
|
||||
@@ -276,7 +276,7 @@ async function queryConversationsAndContacts(
|
||||
const { ourNumber, noteToSelf } = options;
|
||||
const query = providedQuery.replace(/[+-.()]*/g, '');
|
||||
|
||||
const searchResults: Array<ConversationType> = await dataSearchConversations(
|
||||
const searchResults: Array<DBConversationType> = await dataSearchConversations(
|
||||
query
|
||||
);
|
||||
|
||||
@@ -287,7 +287,7 @@ async function queryConversationsAndContacts(
|
||||
for (let i = 0; i < max; i += 1) {
|
||||
const conversation = searchResults[i];
|
||||
|
||||
if (conversation.type === 'direct' && !Boolean(conversation.lastMessage)) {
|
||||
if (conversation.type === 'private' && !Boolean(conversation.lastMessage)) {
|
||||
contacts.push(conversation.id);
|
||||
} else {
|
||||
conversations.push(conversation.id);
|
||||
|
||||
Reference in New Issue
Block a user