mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
Validate conversation type
This commit is contained in:
@@ -39,6 +39,10 @@
|
||||
var missing = _.filter(required, function(attr) { return !attributes[attr]; });
|
||||
if (missing.length) { return "Conversation must have " + missing; }
|
||||
|
||||
if (attributes.type !== 'private' && attributes.type !== 'group') {
|
||||
return "Invalid conversation type: " + attributes.type;
|
||||
}
|
||||
|
||||
// hack
|
||||
if (this.get('type') === 'private') {
|
||||
this.id = libphonenumber.util.verifyNumber(this.id);
|
||||
|
||||
Reference in New Issue
Block a user