Fix crashing send button

destinations is dead. all hail group.members.
This commit is contained in:
lilia 2014-04-06 14:13:27 -07:00
parent 49cdf04065
commit 984a76eeb1

View file

@ -47,8 +47,9 @@ registerOnLoadFunction(function() {
).appendTo(ul); ).appendTo(ul);
$('#button' + i).click(function() { $('#button' + i).click(function() {
var sendDestinations = [conversation[0].sender]; var sendDestinations = [conversation[0].sender];
for (var j = 0; j < conversation[0].destinations.length; j++) if (conversation[0].group) {
sendDestinations[sendDestinations.length] = conversation[0].destinations[j]; sendDestinations = conversation[0].group.members;
}
var messageProto = new PushMessageContentProtobuf(); var messageProto = new PushMessageContentProtobuf();
messageProto.body = $('#text' + i).val(); messageProto.body = $('#text' + i).val();