src/plugin/iframe_root/modules/notifications/groups.js
/**
         * Updates note info with missing information. Currently checks if the note's target is missing
         * the entity name (if it's a narrative and is missing the name, for instance), and makes a
         * call to the groups service to get it.
         *
         * If that fails, just silently moves on as a no-op.
         */
Updates note info with missing information. Currently checks if the note's target is missing
the entity name (if it's a narrative and is missing the name, for instance), and makes a
call to the groups service to get it.

If that fails, just silently moves on as a no-op.
Updates note info with missing information . Currently checks if the note ' s target is missing the entity name ( if it ' s a narrative and is missing the name for instance ) and makes a call to the groups service to get it . If that fails just silently moves on as a no - op .
updateNoteInfo() {
            if (this.note.verb === 'requested' && this.note.target.length === 1 &&
                this.note.target[0].type === 'workspace' && !this.note.target[0].hasOwnProperty('name')) {
                let groupsClient = new GroupsAPI(
                    this.runtime.getConfig('services.groups.url'),
                    this.runtime.service('session').getAuthToken()
                );
                return groupsClient.getResourceInfo(this.note.external_key)
                    .then((info) => {
                        this.note.target[0].name = info.narrname;
                    })
                    .catch((error) => {
                        console.error(error);
                    });
            } else {
                return Promise.resolve();
            }
        }
updateNoteInfo ( ) { if ( this . note . verb === 'requested' && this . note . target . length === 1 && this . note . target [ 0 ] . type === 'workspace' && ! this . note . target [ 0 ] . hasOwnProperty ( 'name' ) ) { let groupsClient = new GroupsAPI ( this . runtime . getConfig ( 'services.groups.url' ) , this . runtime . service ( 'session' ) . getAuthToken ( ) ) ; return groupsClient . getResourceInfo ( this . note . external_key ) . then ( ( info ) => { this . note . target [ 0 ] . name = info . narrname ; } ) . catch ( ( error ) => { console . error ( error ) ; } ) ; } else { return Promise . resolve ( ) ; } }
Updates note info with missing information.
Updates note info with missing information .