Don't create a group without a name

pull/749/head
lilia 10 years ago
parent d5c85dfbd8
commit 2de682ef7b

@ -196,10 +196,15 @@ var Whisper = Whisper || {};
},
createGroup: function() {
var name = this.$el.find('.new-group-update-form .name').val();
if (!name.trim().length) {
return;
}
return this.avatarInput.getFiles().then(function(avatarFiles) {
var attributes = {
type: 'group',
name: this.$el.find('.new-group-update-form .name').val(),
name: name,
avatar: avatarFiles[0],
members: this.recipients.pluck('id')
};

Loading…
Cancel
Save