Single member groups: Make all group-related sends a noop
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user