isInSystemContacts should use systemName

This commit is contained in:
Fedor Indutny 2023-03-22 12:25:52 -07:00 committed by GitHub
parent f272433b7a
commit 56145fabcc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 2 deletions

View file

@ -62,9 +62,13 @@ export default {
onDeleteList: { action: true },
onDistributionListCreated: { action: true },
onHideMyStoriesFrom: { action: true },
onMediaPlaybackStart: { action: true },
onSend: { action: true },
onViewersUpdated: { action: true },
setMyStoriesToAllSignalConnections: { action: true },
mostRecentActiveStoryTimestampByGroupOrDistributionList: {
defaultValue: {},
},
signalConnections: {
defaultValue: Array.from(Array(42), getDefaultConversation),
},

View file

@ -4,9 +4,16 @@
export const isInSystemContacts = ({
type,
name,
systemGivenName,
systemFamilyName,
}: Readonly<{
type?: string;
name?: string;
systemGivenName?: string;
systemFamilyName?: string;
}>): boolean =>
// `direct` for redux, `private` for models and the database
(type === 'direct' || type === 'private') && typeof name === 'string';
(type === 'direct' || type === 'private') &&
(typeof name === 'string' ||
typeof systemGivenName === 'string' ||
typeof systemFamilyName === 'string');

View file

@ -7,11 +7,13 @@ import { mapValues } from 'lodash';
import type { IPCType } from '../../window.d';
import { parseIntWithFallback } from '../../util/parseIntWithFallback';
import { getSignalConnections } from '../../util/getSignalConnections';
import { UUIDKind } from '../../types/UUID';
import { ThemeType } from '../../types/Util';
import { getEnvironment, Environment } from '../../environment';
import { SignalContext } from '../context';
import * as log from '../../logging/log';
import { formatCountForLogging } from '../../logging/formatCountForLogging';
import * as Errors from '../../types/errors';
import { strictAssert } from '../../util/assert';
@ -202,7 +204,12 @@ ipc.on('additional-log-data-request', async event => {
const valueString = value && value !== 'TRUE' ? ` ${value}` : '';
return `${enableString}${valueString}`;
}),
statistics,
statistics: {
...statistics,
signalConnectionCount: formatCountForLogging(
getSignalConnections().length
),
},
user: {
deviceId: window.textsecure.storage.user.getDeviceId(),
e164: window.textsecure.storage.user.getNumber(),