disable mediumGroup for now

pull/1137/head
Audric Ackermann 5 years ago
parent f9ce6fd840
commit 952606b975
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -929,33 +929,34 @@ MessageReceiver.prototype.extend({
await this.handleEndSession(destination); await this.handleEndSession(destination);
} }
if (msg.mediumGroupUpdate) { // if (msg.mediumGroupUpdate) {
await this.handleMediumGroupUpdate(envelope, msg.mediumGroupUpdate); // await this.handleMediumGroupUpdate(envelope, msg.mediumGroupUpdate);
return; // return;
} // }
const message = await this.processDecrypted(envelope, msg); const message = await this.processDecrypted(envelope, msg);
const groupId = message.group && message.group.id;
const isBlocked = this.isGroupBlocked(groupId);
const primaryDevicePubKey = window.storage.get('primaryDevicePubKey'); const primaryDevicePubKey = window.storage.get('primaryDevicePubKey');
const isMe = // const groupId = message.group && message.group.id;
envelope.source === textsecure.storage.user.getNumber() || // const isBlocked = this.isGroupBlocked(groupId);
envelope.source === primaryDevicePubKey; //
const isLeavingGroup = Boolean( // const isMe =
message.group && // envelope.source === textsecure.storage.user.getNumber() ||
message.group.type === textsecure.protobuf.GroupContext.Type.QUIT // envelope.source === primaryDevicePubKey;
); // const isLeavingGroup = Boolean(
// message.group &&
if (groupId && isBlocked && !(isMe && isLeavingGroup)) { // message.group.type === textsecure.protobuf.GroupContext.Type.QUIT
window.log.warn( // );
`Message ${this.getEnvelopeId(
envelope // if (groupId && isBlocked && !(isMe && isLeavingGroup)) {
)} ignored; destined for blocked group` // window.log.warn(
); // `Message ${this.getEnvelopeId(
this.removeFromCache(envelope); // envelope
return; // )} ignored; destined for blocked group`
} // );
// this.removeFromCache(envelope);
// return;
// }
// handle profileKey and avatar updates // handle profileKey and avatar updates
if (envelope.source === primaryDevicePubKey) { if (envelope.source === primaryDevicePubKey) {

Loading…
Cancel
Save