mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
Reject messages sent to groups with no members
If you're the last member of the group, it doesn't make sense to send messages to it. Previously, we would wait forever for a callback, causing a stuck pending state indicator. // FREEBIE
This commit is contained in:
@@ -148,6 +148,9 @@ MessageSender.prototype = {
|
||||
timestamp = timestamp || Date.now();
|
||||
var me = textsecure.storage.user.getNumber();
|
||||
numbers = numbers.filter(function(number) { return number != me; });
|
||||
if (numbers.length === 0) {
|
||||
return Promise.reject(new Error('No other members in the group'));
|
||||
}
|
||||
|
||||
return new Promise(function(resolve, reject) {
|
||||
this.sendMessageProto(timestamp, numbers, proto, function(res) {
|
||||
|
||||
Reference in New Issue
Block a user