Reduce unnecessary or overly verbose logging
This commit is contained in:
parent
850482ea70
commit
089e2864b3
7 changed files with 16 additions and 17 deletions
|
@ -345,7 +345,6 @@
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const id = await normalizeEncodedAddress(encodedAddress);
|
const id = await normalizeEncodedAddress(encodedAddress);
|
||||||
window.log.info('loadSession', { encodedAddress, id });
|
|
||||||
const session = this.sessions[id];
|
const session = this.sessions[id];
|
||||||
|
|
||||||
if (session) {
|
if (session) {
|
||||||
|
@ -366,7 +365,6 @@
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const id = await normalizeEncodedAddress(encodedAddress);
|
const id = await normalizeEncodedAddress(encodedAddress);
|
||||||
window.log.info('storeSession', { encodedAddress, id });
|
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
id,
|
id,
|
||||||
|
|
|
@ -395,10 +395,8 @@ export class ConversationController {
|
||||||
// 3. Handle match on only UUID
|
// 3. Handle match on only UUID
|
||||||
}
|
}
|
||||||
if (!convoE164 && convoUuid) {
|
if (!convoE164 && convoUuid) {
|
||||||
window.log.info(
|
|
||||||
`ensureContactIds: UUID-only match found (have e164: ${Boolean(e164)})`
|
|
||||||
);
|
|
||||||
if (e164 && highTrust) {
|
if (e164 && highTrust) {
|
||||||
|
window.log.info('ensureContactIds: Adding e164 to UUID-only match');
|
||||||
convoUuid.updateE164(e164);
|
convoUuid.updateE164(e164);
|
||||||
updateConversation(convoUuid.attributes);
|
updateConversation(convoUuid.attributes);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2206,9 +2206,16 @@ export class ConversationModel extends window.Backbone.Model<
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const emoji = this.get('aboutEmoji');
|
||||||
|
const text = this.get('about');
|
||||||
|
|
||||||
|
if (!emoji) {
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
return window.i18n('message--getNotificationText--text-with-emoji', {
|
return window.i18n('message--getNotificationText--text-with-emoji', {
|
||||||
text: this.get('about'),
|
text,
|
||||||
emoji: this.get('aboutEmoji'),
|
emoji,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2743,10 +2750,6 @@ export class ConversationModel extends window.Backbone.Model<
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
window.log.warn(
|
|
||||||
'getMembers: Group conversation had neither membersV2 nor members'
|
|
||||||
);
|
|
||||||
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2828,7 +2828,7 @@ async function getLastConversationActivity({
|
||||||
type = 'group-v2-change' AND
|
type = 'group-v2-change' AND
|
||||||
json_extract(json, '$.groupV2Change.from') != $ourConversationId AND
|
json_extract(json, '$.groupV2Change.from') != $ourConversationId AND
|
||||||
json_extract(json, '$.groupV2Change.details.length') = 1 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
|
json_extract(json, '$.groupV2Change.details[0].conversationId') != $ourConversationId
|
||||||
)
|
)
|
||||||
ORDER BY received_at DESC, sent_at DESC
|
ORDER BY received_at DESC, sent_at DESC
|
||||||
|
@ -2870,7 +2870,7 @@ async function getLastConversationPreview({
|
||||||
type = 'group-v2-change' AND
|
type = 'group-v2-change' AND
|
||||||
json_extract(json, '$.groupV2Change.from') != $ourConversationId AND
|
json_extract(json, '$.groupV2Change.from') != $ourConversationId AND
|
||||||
json_extract(json, '$.groupV2Change.details.length') = 1 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
|
json_extract(json, '$.groupV2Change.details[0].conversationId') != $ourConversationId
|
||||||
)
|
)
|
||||||
ORDER BY received_at DESC, sent_at DESC
|
ORDER BY received_at DESC, sent_at DESC
|
||||||
|
|
|
@ -142,7 +142,7 @@ export type MessageType = {
|
||||||
| 'verified-change'
|
| 'verified-change'
|
||||||
| 'message-history-unsynced'
|
| 'message-history-unsynced'
|
||||||
| 'call-history';
|
| 'call-history';
|
||||||
quote?: { author: string };
|
quote?: { author?: string; authorUuid?: string };
|
||||||
received_at: number;
|
received_at: number;
|
||||||
sent_at?: number;
|
sent_at?: number;
|
||||||
hasSignalAccount?: boolean;
|
hasSignalAccount?: boolean;
|
||||||
|
|
|
@ -423,8 +423,8 @@ export const getMessageSelector = createSelector(
|
||||||
author = conversationSelector(ourNumber);
|
author = conversationSelector(ourNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (quote) {
|
if (quote && (quote.author || quote.authorUuid)) {
|
||||||
quoted = conversationSelector(quote.author);
|
quoted = conversationSelector(quote.authorUuid || quote.author);
|
||||||
}
|
}
|
||||||
|
|
||||||
return messageSelector(
|
return messageSelector(
|
||||||
|
|
|
@ -285,7 +285,7 @@
|
||||||
"rule": "jQuery-load(",
|
"rule": "jQuery-load(",
|
||||||
"path": "js/signal_protocol_store.js",
|
"path": "js/signal_protocol_store.js",
|
||||||
"line": " await ConversationController.load();",
|
"line": " await ConversationController.load();",
|
||||||
"lineNumber": 1024,
|
"lineNumber": 1022,
|
||||||
"reasonCategory": "falseMatch",
|
"reasonCategory": "falseMatch",
|
||||||
"updated": "2020-06-12T14:20:09.936Z"
|
"updated": "2020-06-12T14:20:09.936Z"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue