blob: 28e83098228fa2799425944da7e8e9c48cc81a51 [file] [log] [blame]
Adrià Vilanova Martínez0d92a0c2023-11-06 01:37:20 +01001import {kViewUnifiedUserResponseEvent} from '../consts.js';
2
3import ResponseEventBasedInfoHandler from './basedOnResponseEvent.js';
4
5export default class ProfileInfoHandler extends ResponseEventBasedInfoHandler {
6 getEvent() {
7 return kViewUnifiedUserResponseEvent;
8 }
9
10 async isInfoCurrent() {
11 return Date.now() - this.info.timestamp < 15 * 1000;
12 }
13
14 getWaitForCurrentInfoOptions() {
15 return {
16 interval: 500,
17 timeout: 15 * 1000,
18 };
19 }
20}