function manageTimes(conversationID) {
        if (!conversationID) {
            return;
        }

        const { Labels = [] } = api.getConversationCached(conversationID) || {};
        const messages = api.queryMessagesCached(conversationID, false); // messages are ordered by -Time

        if (messages.length) {
            Labels.forEach(({ ID }) => {
                // Get the most recent message for a specific label
                const { Time } =
                    flow(
                        filter(({ LabelIDs = [] }) => _.includes(LabelIDs, ID)),
                        head
                    )(messages) || {};
                Time && storeTime(conversationID, ID, Time);
            });
        }
    }
/**
     * Update time for conversation
     * @param {String} conversationID
     */
Update time for conversation
@param {String} conversationID
Update time for conversation @param { String } conversationID
function manageTimes(conversationID) {
        if (!conversationID) {
            return;
        }
        const { Labels = [] } = api.getConversationCached(conversationID) || {};
        const messages = api.queryMessagesCached(conversationID, false); 
        if (messages.length) {
            Labels.forEach(({ ID }) => {
                const { Time } =
                    flow(
                        filter(({ LabelIDs = [] }) => _.includes(LabelIDs, ID)),
                        head
                    )(messages) || {};
                Time && storeTime(conversationID, ID, Time);
            });
        }
    }
function manageTimes ( conversationID ) { if ( ! conversationID ) { return ; } const { Labels = [ ] } = api . getConversationCached ( conversationID ) || { } ; const messages = api . queryMessagesCached ( conversationID , false ) ; if ( messages . length ) { Labels . forEach ( ( { ID } ) => { const { Time } = flow ( filter ( ( { LabelIDs = [ ] } ) => _ . includes ( LabelIDs , ID ) ) , head ) ( messages ) || { } ; Time && storeTime ( conversationID , ID , Time ) ; } ) ; } }
Update time for conversation
 @param {String} conversationID
Update time for conversation @param { String } conversationID
// messages are ordered by -Time // Get the most recent message for a specific label