Group Blocking: Allow group metadata messages from own devices
This commit is contained in:
parent
9c399624cc
commit
c2e0ec5636
1 changed files with 10 additions and 2 deletions
|
@ -728,7 +728,11 @@ MessageReceiver.prototype.extend({
|
||||||
return p.then(() =>
|
return p.then(() =>
|
||||||
this.processDecrypted(envelope, msg, this.number).then(message => {
|
this.processDecrypted(envelope, msg, this.number).then(message => {
|
||||||
const groupId = message.group && message.group.id;
|
const groupId = message.group && message.group.id;
|
||||||
if (groupId && this.isGroupBlocked(groupId)) {
|
const isBlocked = this.isGroupBlocked(groupId);
|
||||||
|
const isMe = envelope.source === textsecure.storage.user.getNumber();
|
||||||
|
const hasGroupMetadata = Boolean(message.group);
|
||||||
|
|
||||||
|
if (groupId && isBlocked && !(isMe && hasGroupMetadata)) {
|
||||||
window.log.warn(
|
window.log.warn(
|
||||||
`Message ${this.getEnvelopeId(
|
`Message ${this.getEnvelopeId(
|
||||||
envelope
|
envelope
|
||||||
|
@ -762,7 +766,11 @@ MessageReceiver.prototype.extend({
|
||||||
return p.then(() =>
|
return p.then(() =>
|
||||||
this.processDecrypted(envelope, msg, envelope.source).then(message => {
|
this.processDecrypted(envelope, msg, envelope.source).then(message => {
|
||||||
const groupId = message.group && message.group.id;
|
const groupId = message.group && message.group.id;
|
||||||
if (groupId && this.isGroupBlocked(groupId)) {
|
const isBlocked = this.isGroupBlocked(groupId);
|
||||||
|
const isMe = envelope.source === textsecure.storage.user.getNumber();
|
||||||
|
const hasGroupMetadata = Boolean(message.group);
|
||||||
|
|
||||||
|
if (groupId && isBlocked && !(isMe && hasGroupMetadata)) {
|
||||||
window.log.warn(
|
window.log.warn(
|
||||||
`Message ${this.getEnvelopeId(
|
`Message ${this.getEnvelopeId(
|
||||||
envelope
|
envelope
|
||||||
|
|
Loading…
Add table
Reference in a new issue