Send profile and update it

pull/388/head
Beaudan 6 years ago
parent 014558d939
commit 21f0149e22

@ -1972,6 +1972,12 @@
} }
); );
} }
} else if (dataMessage.profile) {
ConversationController.getOrCreateAndWait(source, 'private').then(
sender => {
sender.setProfile(dataMessage.profile);
}
);
} }
let autoAccept = false; let autoAccept = false;

@ -946,6 +946,7 @@ MessageSender.prototype = {
if (options.publicEndpoint) { if (options.publicEndpoint) {
numbers = [groupId]; numbers = [groupId];
} }
const profile = textsecure.storage.impl.getLocalProfile();
const attrs = { const attrs = {
recipients: numbers, recipients: numbers,
body: messageText, body: messageText,
@ -956,6 +957,7 @@ MessageSender.prototype = {
needsSync: true, needsSync: true,
expireTimer, expireTimer,
profileKey, profileKey,
profile,
group: { group: {
id: groupId, id: groupId,
type: textsecure.protobuf.GroupContext.Type.DELIVER, type: textsecure.protobuf.GroupContext.Type.DELIVER,

Loading…
Cancel
Save