Skip to content

Commit

Permalink
fix: make expiresAt parser major browsers compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
chartrandf committed Feb 13, 2024
1 parent a744222 commit 3c3057b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/domain/Session.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-nested-ternary */
import { KEYUTIL, KJUR, b64utoutf8 } from 'jsrsasign';
import moment from 'moment';
import swarmPublicKey from '../pubkey';
import Profile from './Profile';
import Contact from './Contact';
Expand Down Expand Up @@ -126,7 +127,7 @@ export default class Session {
authorizations,
acl: plain.data.acls ? plain.data.acls : plain.data.acl ? plain.data.acl : [],
tenantUuid: plain.data.metadata ? plain.data.metadata.tenant_uuid : undefined,
expiresAt: new Date(`${plain.data.utc_expires_at}z`),
expiresAt: moment.utc(plain.data.utc_expires_at).toDate(),
stackUuid: plain.data.xivo_uuid,
// eslint-disable-next-line
stackHostFromHeader: plain._headers?.get?.('wazo-stack-host'),
Expand Down

0 comments on commit 3c3057b

Please sign in to comment.