B2G/gaia/apps/sms/js/thread_ui.js
// Create a recipient from contacts activity.
Create a recipient from contacts activity.
Create a recipient from contacts activity .
function thui_requestContact() {
    this.assimilateRecipients();
    if (typeof MozActivity === 'undefined') {
      console.log('MozActivity unavailable');
      return;
    }
    var activity = new MozActivity({
      name: 'pick',
      data: {
        type: 'webcontacts/contact'
      }
    });
    activity.onsuccess = (function() {
      Utils.getContactDisplayInfo(Contacts.findByPhoneNumber.bind(Contacts),
        activity.result.number,
        (function onData(data) {
        data.source = 'contacts';
        this.recipients.add(data);
      }).bind(this));
    }).bind(this);
    activity.onerror = (function(e) {
      console.log('WebActivities unavailable? : ' + e);
    }).bind(this);
  }
function thui_requestContact ( ) { this . assimilateRecipients ( ) ; if ( typeof MozActivity === 'undefined' ) { console . log ( 'MozActivity unavailable' ) ; return ; } var activity = new MozActivity ( { name : 'pick' , data : { type : 'webcontacts/contact' } } ) ; activity . onsuccess = ( function ( ) { Utils . getContactDisplayInfo ( Contacts . findByPhoneNumber . bind ( Contacts ) , activity . result . number , ( function onData ( data ) { data . source = 'contacts' ; this . recipients . add ( data ) ; } ) . bind ( this ) ) ; } ) . bind ( this ) ; activity . onerror = ( function ( e ) { console . log ( 'WebActivities unavailable? : ' + e ) ; } ) . bind ( this ) ; }
Create a recipient from contacts activity.
Create a recipient from contacts activity .
// assimilate stranded string before picking a contact.