diff --git a/services/gunDB/contact-api/actions.js b/services/gunDB/contact-api/actions.js index 316360ee..2e8d1ca0 100644 --- a/services/gunDB/contact-api/actions.js +++ b/services/gunDB/contact-api/actions.js @@ -3,6 +3,7 @@ */ const uuidv1 = require('uuid/v1') const logger = require('../../../config/log') +const throttle = require('lodash/throttle') const Common = require('shock-common') const { Constants, Schema } = Common @@ -760,14 +761,14 @@ const saveChannelsBackup = async (backups, user, SEA) => { /** * @returns {Promise} */ -const setLastSeenApp = () => { +const setLastSeenApp = throttle(() => { const user = require('../Mediator').getUser() return user .get(Key.PROFILE) .get(Key.LAST_SEEN_APP) .pPut(Date.now()) -} +}, 10000) /** * @param {string[]} tags