setProfileKey: Introduce 'reason' parameter for improved logging
This commit is contained in:
parent
c2e7f30988
commit
b32dbf2c68
8 changed files with 48 additions and 28 deletions
|
@ -2008,14 +2008,22 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||
) {
|
||||
conversation.set({ profileSharing: true });
|
||||
} else if (isDirectConversation(conversation.attributes)) {
|
||||
void conversation.setProfileKey(profileKey);
|
||||
drop(
|
||||
conversation.setProfileKey(profileKey, {
|
||||
reason: 'handleDataMessage',
|
||||
})
|
||||
);
|
||||
} else {
|
||||
const local = window.ConversationController.lookupOrCreate({
|
||||
e164: source,
|
||||
serviceId: sourceServiceId,
|
||||
reason: 'handleDataMessage:setProfileKey',
|
||||
});
|
||||
void local?.setProfileKey(profileKey);
|
||||
drop(
|
||||
local?.setProfileKey(profileKey, {
|
||||
reason: 'handleDataMessage',
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue