isInSystemContacts should use systemName
This commit is contained in:
parent
f272433b7a
commit
56145fabcc
3 changed files with 20 additions and 2 deletions
|
@ -62,9 +62,13 @@ export default {
|
||||||
onDeleteList: { action: true },
|
onDeleteList: { action: true },
|
||||||
onDistributionListCreated: { action: true },
|
onDistributionListCreated: { action: true },
|
||||||
onHideMyStoriesFrom: { action: true },
|
onHideMyStoriesFrom: { action: true },
|
||||||
|
onMediaPlaybackStart: { action: true },
|
||||||
onSend: { action: true },
|
onSend: { action: true },
|
||||||
onViewersUpdated: { action: true },
|
onViewersUpdated: { action: true },
|
||||||
setMyStoriesToAllSignalConnections: { action: true },
|
setMyStoriesToAllSignalConnections: { action: true },
|
||||||
|
mostRecentActiveStoryTimestampByGroupOrDistributionList: {
|
||||||
|
defaultValue: {},
|
||||||
|
},
|
||||||
signalConnections: {
|
signalConnections: {
|
||||||
defaultValue: Array.from(Array(42), getDefaultConversation),
|
defaultValue: Array.from(Array(42), getDefaultConversation),
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,9 +4,16 @@
|
||||||
export const isInSystemContacts = ({
|
export const isInSystemContacts = ({
|
||||||
type,
|
type,
|
||||||
name,
|
name,
|
||||||
|
systemGivenName,
|
||||||
|
systemFamilyName,
|
||||||
}: Readonly<{
|
}: Readonly<{
|
||||||
type?: string;
|
type?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
|
systemGivenName?: string;
|
||||||
|
systemFamilyName?: string;
|
||||||
}>): boolean =>
|
}>): boolean =>
|
||||||
// `direct` for redux, `private` for models and the database
|
// `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');
|
||||||
|
|
|
@ -7,11 +7,13 @@ import { mapValues } from 'lodash';
|
||||||
|
|
||||||
import type { IPCType } from '../../window.d';
|
import type { IPCType } from '../../window.d';
|
||||||
import { parseIntWithFallback } from '../../util/parseIntWithFallback';
|
import { parseIntWithFallback } from '../../util/parseIntWithFallback';
|
||||||
|
import { getSignalConnections } from '../../util/getSignalConnections';
|
||||||
import { UUIDKind } from '../../types/UUID';
|
import { UUIDKind } from '../../types/UUID';
|
||||||
import { ThemeType } from '../../types/Util';
|
import { ThemeType } from '../../types/Util';
|
||||||
import { getEnvironment, Environment } from '../../environment';
|
import { getEnvironment, Environment } from '../../environment';
|
||||||
import { SignalContext } from '../context';
|
import { SignalContext } from '../context';
|
||||||
import * as log from '../../logging/log';
|
import * as log from '../../logging/log';
|
||||||
|
import { formatCountForLogging } from '../../logging/formatCountForLogging';
|
||||||
import * as Errors from '../../types/errors';
|
import * as Errors from '../../types/errors';
|
||||||
|
|
||||||
import { strictAssert } from '../../util/assert';
|
import { strictAssert } from '../../util/assert';
|
||||||
|
@ -202,7 +204,12 @@ ipc.on('additional-log-data-request', async event => {
|
||||||
const valueString = value && value !== 'TRUE' ? ` ${value}` : '';
|
const valueString = value && value !== 'TRUE' ? ` ${value}` : '';
|
||||||
return `${enableString}${valueString}`;
|
return `${enableString}${valueString}`;
|
||||||
}),
|
}),
|
||||||
statistics,
|
statistics: {
|
||||||
|
...statistics,
|
||||||
|
signalConnectionCount: formatCountForLogging(
|
||||||
|
getSignalConnections().length
|
||||||
|
),
|
||||||
|
},
|
||||||
user: {
|
user: {
|
||||||
deviceId: window.textsecure.storage.user.getDeviceId(),
|
deviceId: window.textsecure.storage.user.getDeviceId(),
|
||||||
e164: window.textsecure.storage.user.getNumber(),
|
e164: window.textsecure.storage.user.getNumber(),
|
||||||
|
|
Loading…
Reference in a new issue