Single member groups: Make all group-related sends a noop
This commit is contained in:
parent
42041d955c
commit
b83ae11cb3
1 changed files with 13 additions and 2 deletions
|
@ -908,7 +908,12 @@ MessageSender.prototype = {
|
|||
const me = textsecure.storage.user.getNumber();
|
||||
const numbers = groupNumbers.filter(number => number !== me);
|
||||
if (numbers.length === 0) {
|
||||
return Promise.reject(new Error('No other members in the group'));
|
||||
return Promise.resolve({
|
||||
successfulNumbers: [],
|
||||
failoverNumbers: [],
|
||||
errors: [],
|
||||
unidentifiedDeliveries: [],
|
||||
});
|
||||
}
|
||||
|
||||
return this.sendMessage(
|
||||
|
@ -1022,8 +1027,14 @@ MessageSender.prototype = {
|
|||
const me = textsecure.storage.user.getNumber();
|
||||
const numbers = groupNumbers.filter(number => number !== me);
|
||||
if (numbers.length === 0) {
|
||||
return Promise.reject(new Error('No other members in the group'));
|
||||
return Promise.resolve({
|
||||
successfulNumbers: [],
|
||||
failoverNumbers: [],
|
||||
errors: [],
|
||||
unidentifiedDeliveries: [],
|
||||
});
|
||||
}
|
||||
|
||||
return this.sendMessage(
|
||||
{
|
||||
recipients: numbers,
|
||||
|
|
Loading…
Reference in a new issue