mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Create contact by number with no country code or +
Search box finds or creates a conversation given a phone number in local (to the user's region) or international format. Previously you had to enter e164 format to set up the conversation correctly. If the number is not valid, do not open the conversation. TODO: user feedback on invalid numbers. // FREEBIE
This commit is contained in:
@@ -66,9 +66,17 @@
|
||||
},
|
||||
|
||||
createConversation: function() {
|
||||
this.$el.trigger('open', this.new_contact_view.model);
|
||||
this.initNewContact();
|
||||
this.resetTypeahead();
|
||||
var conversation = this.new_contact_view.model;
|
||||
var error = conversation.validate(conversation.attributes);
|
||||
if (!error) {
|
||||
ConversationController.findOrCreatePrivateById(
|
||||
this.new_contact_view.model.id
|
||||
).then(function(conversation) {
|
||||
this.$el.trigger('open', conversation);
|
||||
this.initNewContact();
|
||||
this.resetTypeahead();
|
||||
}.bind(this));
|
||||
}
|
||||
},
|
||||
|
||||
open: function(e, conversation) {
|
||||
|
||||
Reference in New Issue
Block a user