v1.5.1/chip fix
This commit is contained in:
+1
-1
@@ -431,7 +431,7 @@ export default class Chat extends Component {
|
|||||||
className="party-controls-users-chip"
|
className="party-controls-users-chip"
|
||||||
clickable
|
clickable
|
||||||
size="small"
|
size="small"
|
||||||
label={usersOnCall[id].info.name}
|
label={usersOnCall[id].info.name || ' '}
|
||||||
/>
|
/>
|
||||||
) : null;
|
) : null;
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -46,6 +46,23 @@ module.exports = async (req, res) => {
|
|||||||
err
|
err
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
await admin
|
||||||
|
.firestore()
|
||||||
|
.collection('rooms')
|
||||||
|
.doc(bodydata.partyName)
|
||||||
|
.collection('messages')
|
||||||
|
.add({
|
||||||
|
uid: '<system>',
|
||||||
|
name: '',
|
||||||
|
text: `Voice calls are unavailable temporarily.`,
|
||||||
|
time: new Date(),
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error(
|
||||||
|
`Failed to add system voice call message : \n\t Room: ${bodydata.partyName}`,
|
||||||
|
err
|
||||||
|
);
|
||||||
|
});
|
||||||
await admin
|
await admin
|
||||||
.firestore()
|
.firestore()
|
||||||
.collection('rooms')
|
.collection('rooms')
|
||||||
|
|||||||
@@ -1,20 +1,21 @@
|
|||||||
const VoxeetSecret = require('../VoxeetSecret.json');
|
const VoxeetSecret = require('../VoxeetSecret.json');
|
||||||
module.exports = async (req, res) => {
|
module.exports = async (req, res) => {
|
||||||
const { key, secret } = VoxeetSecret;
|
res.status(403).send({ message: 'Voice calls are unavailable temporarily.' });
|
||||||
const credentials = btoa(encodeURI(key) + ':' + encodeURI(secret));
|
// const { key, secret } = VoxeetSecret;
|
||||||
const headers = {
|
// const credentials = btoa(encodeURI(key) + ':' + encodeURI(secret));
|
||||||
'Content-Type': 'application/json',
|
// const headers = {
|
||||||
'Cache-Control': 'no-cache',
|
// 'Content-Type': 'application/json',
|
||||||
Authorization: 'Basic ' + credentials,
|
// 'Cache-Control': 'no-cache',
|
||||||
};
|
// Authorization: 'Basic ' + credentials,
|
||||||
const oauth = await fetch(VoxeetSecret.refreshURL, {
|
// };
|
||||||
method: 'POST',
|
// const oauth = await fetch(VoxeetSecret.refreshURL, {
|
||||||
headers,
|
// method: 'POST',
|
||||||
body: JSON.stringify({
|
// headers,
|
||||||
refresh_token: req.params.token,
|
// body: JSON.stringify({
|
||||||
}),
|
// refresh_token: req.params.token,
|
||||||
})
|
// }),
|
||||||
.then((oauthResponse) => oauthResponse.json())
|
// })
|
||||||
.catch((err) => res.status(500).send(err));
|
// .then((oauthResponse) => oauthResponse.json())
|
||||||
if (oauth) res.status(200).send(oauth);
|
// .catch((err) => res.status(500).send(err));
|
||||||
|
// if (oauth) res.status(200).send(oauth);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,21 +1,22 @@
|
|||||||
const VoxeetSecret = require('../VoxeetSecret.json');
|
const VoxeetSecret = require('../VoxeetSecret.json');
|
||||||
const fetch = require('node-fetch');
|
const fetch = require('node-fetch');
|
||||||
module.exports = async (req, res) => {
|
module.exports = async (req, res) => {
|
||||||
const { key, secret } = VoxeetSecret;
|
res.status(403).send({ message: 'Voice calls are unavailable temporarily.' });
|
||||||
const credentials = Buffer.from(encodeURI(key) + ':' + encodeURI(secret)).toString('base64');
|
// const { key, secret } = VoxeetSecret;
|
||||||
const headers = {
|
// const credentials = Buffer.from(encodeURI(key) + ':' + encodeURI(secret)).toString('base64');
|
||||||
'Content-Type': 'application/json',
|
// const headers = {
|
||||||
'Cache-Control': 'no-cache',
|
// 'Content-Type': 'application/json',
|
||||||
Authorization: 'Basic ' + credentials,
|
// 'Cache-Control': 'no-cache',
|
||||||
};
|
// Authorization: 'Basic ' + credentials,
|
||||||
const oauth = await fetch(VoxeetSecret.validateURL, {
|
// };
|
||||||
method: 'POST',
|
// const oauth = await fetch(VoxeetSecret.validateURL, {
|
||||||
headers,
|
// method: 'POST',
|
||||||
body: JSON.stringify({
|
// headers,
|
||||||
grant_type: 'client_credentials',
|
// body: JSON.stringify({
|
||||||
}),
|
// grant_type: 'client_credentials',
|
||||||
})
|
// }),
|
||||||
.then((oauthResponse) => oauthResponse.json())
|
// })
|
||||||
.catch((err) => res.status(500).send(err));
|
// .then((oauthResponse) => oauthResponse.json())
|
||||||
if (oauth) res.status(200).send(oauth);
|
// .catch((err) => res.status(500).send(err));
|
||||||
|
// if (oauth) res.status(200).send(oauth);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user