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,10 +1900,11 @@
window.console.warn('sendGroupInfo invalid pubkey:', recipient); window.console.warn('sendGroupInfo invalid pubkey:', recipient);
return; return;
} }
try {
await libsession await libsession
.getMessageQueue() .getMessageQueue()
.send(recipientPubKey, groupUpdateMessage) .send(recipientPubKey, groupUpdateMessage);
.catch(log.error);
const expireUpdate = { const expireUpdate = {
timestamp: Date.now(), timestamp: Date.now(),
@ -1917,8 +1918,10 @@
await libsession await libsession
.getMessageQueue() .getMessageQueue()
.sendUsingMultiDevice(recipientPubKey, expirationTimerMessage) .sendUsingMultiDevice(recipientPubKey, expirationTimerMessage);
.catch(log.error); } catch (e) {
log.error('Failed to send groupInfo:', e);
}
} }
}, },

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

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

Loading…
Cancel
Save