address review

pull/1223/head
Audric Ackermann 5 years ago
parent bd67040086
commit 696fbd8d7a
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -1900,25 +1900,28 @@
window.console.warn('sendGroupInfo invalid pubkey:', recipient);
return;
}
await libsession
.getMessageQueue()
.send(recipientPubKey, groupUpdateMessage)
.catch(log.error);
const expireUpdate = {
timestamp: Date.now(),
expireTimer: this.get('expireTimer'),
groupId: this.get('id'),
};
try {
await libsession
.getMessageQueue()
.send(recipientPubKey, groupUpdateMessage);
const expirationTimerMessage = new libsession.Messages.Outgoing.ExpirationTimerUpdateMessage(
expireUpdate
);
const expireUpdate = {
timestamp: Date.now(),
expireTimer: this.get('expireTimer'),
groupId: this.get('id'),
};
await libsession
.getMessageQueue()
.sendUsingMultiDevice(recipientPubKey, expirationTimerMessage)
.catch(log.error);
const expirationTimerMessage = new libsession.Messages.Outgoing.ExpirationTimerUpdateMessage(
expireUpdate
);
await libsession
.getMessageQueue()
.sendUsingMultiDevice(recipientPubKey, expirationTimerMessage);
} catch (e) {
log.error('Failed to send groupInfo:', e);
}
}
},

@ -435,15 +435,9 @@ export function initIncomingMessage(data: MessageCreationData): MessageModel {
} = data;
const type = 'incoming';
if (
message &&
message.group &&
message.group.id &&
message.group.id.length === 0
) {
message.group.id = null;
}
const groupId = message?.group?.id;
const messageGroupId = message?.group?.id;
const groupId =
messageGroupId && messageGroupId.length > 0 ? messageGroupId : null;
const messageData: any = {
source,

@ -8,11 +8,7 @@ import ByteBuffer from 'bytebuffer';
*/
export function convertToTS(object: any): any {
// No idea why js `ByteBuffer` and ts `ByteBuffer` differ ...
if (
object &&
object.constructor &&
object.constructor.name === 'Uint8Array'
) {
if (object instanceof Uint8Array) {
return object;
} else if (
object &&

Loading…
Cancel
Save