js/src/WebsocketConnection/session.js
function getAttachment(binaryKey) {
    // console.log('Adding binary attachment', binaryKey);
    const index = attachments.findIndex((att) => (att.key === binaryKey));
    if (index !== -1) {
      const result = attachments[index].data;
      // TODO if attachment is sent mulitple times, we shouldn't remove it yet.
      attachments.splice(index, 1);
      return result;
    }
    console.error('Binary attachment key found without matching attachment');
    return null;
  }
function getAttachment(binaryKey) {
    // console.log('Adding binary attachment', binaryKey);
    const index = attachments.findIndex((att) => (att.key === binaryKey));
    if (index !== -1) {
      const result = attachments[index].data;
      // TODO if attachment is sent mulitple times, we shouldn't remove it yet.
      attachments.splice(index, 1);
      return result;
    }
    console.error('Binary attachment key found without matching attachment');
    return null;
  }
function getAttachment ( binaryKey ) { // console.log('Adding binary attachment', binaryKey); const index = attachments . findIndex ( ( att ) => ( att . key === binaryKey ) ) ; if ( index !== - 1 ) { const result = attachments [ index ] . data ; // TODO if attachment is sent mulitple times, we shouldn't remove it yet. attachments . splice ( index , 1 ) ; return result ; } console . error ( 'Binary attachment key found without matching attachment' ) ; return null ; }
split out to support a message with a bare binary attachment.
split out to support a message with a bare binary attachment .