Reduce unnecessary or overly verbose logging

This commit is contained in:
Scott Nonnenberg 2021-02-04 11:39:07 -08:00 committed by GitHub
parent 850482ea70
commit 089e2864b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 17 deletions

View File

@ -345,7 +345,6 @@
try {
const id = await normalizeEncodedAddress(encodedAddress);
window.log.info('loadSession', { encodedAddress, id });
const session = this.sessions[id];
if (session) {
@ -366,7 +365,6 @@
try {
const id = await normalizeEncodedAddress(encodedAddress);
window.log.info('storeSession', { encodedAddress, id });
const data = {
id,

View File

@ -395,10 +395,8 @@ export class ConversationController {
// 3. Handle match on only UUID
}
if (!convoE164 && convoUuid) {
window.log.info(
`ensureContactIds: UUID-only match found (have e164: ${Boolean(e164)})`
);
if (e164 && highTrust) {
window.log.info('ensureContactIds: Adding e164 to UUID-only match');
convoUuid.updateE164(e164);
updateConversation(convoUuid.attributes);
}

View File

@ -2206,9 +2206,16 @@ export class ConversationModel extends window.Backbone.Model<
return undefined;
}
const emoji = this.get('aboutEmoji');
const text = this.get('about');
if (!emoji) {
return text;
}
return window.i18n('message--getNotificationText--text-with-emoji', {
text: this.get('about'),
emoji: this.get('aboutEmoji'),
text,
emoji,
});
}
@ -2743,10 +2750,6 @@ export class ConversationModel extends window.Backbone.Model<
);
}
window.log.warn(
'getMembers: Group conversation had neither membersV2 nor members'
);
return [];
}

View File

@ -2828,7 +2828,7 @@ async function getLastConversationActivity({
type = 'group-v2-change' AND
json_extract(json, '$.groupV2Change.from') != $ourConversationId AND
json_extract(json, '$.groupV2Change.details.length') = 1 AND
json_extract(json, '$.groupV2Change.details[0].type') != 'member-remove' AND
json_extract(json, '$.groupV2Change.details[0].type') = 'member-remove' AND
json_extract(json, '$.groupV2Change.details[0].conversationId') != $ourConversationId
)
ORDER BY received_at DESC, sent_at DESC
@ -2870,7 +2870,7 @@ async function getLastConversationPreview({
type = 'group-v2-change' AND
json_extract(json, '$.groupV2Change.from') != $ourConversationId AND
json_extract(json, '$.groupV2Change.details.length') = 1 AND
json_extract(json, '$.groupV2Change.details[0].type') != 'member-remove' AND
json_extract(json, '$.groupV2Change.details[0].type') = 'member-remove' AND
json_extract(json, '$.groupV2Change.details[0].conversationId') != $ourConversationId
)
ORDER BY received_at DESC, sent_at DESC

View File

@ -142,7 +142,7 @@ export type MessageType = {
| 'verified-change'
| 'message-history-unsynced'
| 'call-history';
quote?: { author: string };
quote?: { author?: string; authorUuid?: string };
received_at: number;
sent_at?: number;
hasSignalAccount?: boolean;

View File

@ -423,8 +423,8 @@ export const getMessageSelector = createSelector(
author = conversationSelector(ourNumber);
}
if (quote) {
quoted = conversationSelector(quote.author);
if (quote && (quote.author || quote.authorUuid)) {
quoted = conversationSelector(quote.authorUuid || quote.author);
}
return messageSelector(

View File

@ -285,7 +285,7 @@
"rule": "jQuery-load(",
"path": "js/signal_protocol_store.js",
"line": " await ConversationController.load();",
"lineNumber": 1024,
"lineNumber": 1022,
"reasonCategory": "falseMatch",
"updated": "2020-06-12T14:20:09.936Z"
},