src/models/event.js
function(userId) {
        // send the request to all of our own devices, and the
        // original sending device if it wasn't us.
        const wireContent = this.getWireContent();
        const recipients = [{
            userId, deviceId: '*',
        }];
        const sender = this.getSender();
        if (sender !== userId) {
            recipients.push({
                userId: sender, deviceId: wireContent.device_id,
            });
        }
        return recipients;
    }
function(userId) {
        // send the request to all of our own devices, and the
        // original sending device if it wasn't us.
        const wireContent = this.getWireContent();
        const recipients = [{
            userId, deviceId: '*',
        }];
        const sender = this.getSender();
        if (sender !== userId) {
            recipients.push({
                userId: sender, deviceId: wireContent.device_id,
            });
        }
        return recipients;
    }
function ( userId ) { // send the request to all of our own devices, and the // original sending device if it wasn't us. const wireContent = this . getWireContent ( ) ; const recipients = [ { userId , deviceId : '*' , } ] ; const sender = this . getSender ( ) ; if ( sender !== userId ) { recipients . push ( { userId : sender , deviceId : wireContent . device_id , } ) ; } return recipients ; }
Calculate the recipients for keyshare requests.

@param {string} userId the user who received this event.

@returns {Array} array of recipients
Calculate the recipients for keyshare requests .