refresh avatar/display names

This commit is contained in:
Daniel Lugo 2020-01-30 08:32:13 -04:00
parent e2a1b85de9
commit a188639ff0
2 changed files with 18 additions and 0 deletions

View file

@ -43,6 +43,15 @@ const react = () => {
const notAccepted = typeof pubToIncoming[req.from] === 'undefined' const notAccepted = typeof pubToIncoming[req.from] === 'undefined'
if (notAccepted) { if (notAccepted) {
if (typeof pubToAvatar[req.from] === 'undefined') {
// eslint-disable-next-line no-empty-function
Streams.onAvatar(() => {}, req.from)
}
if (typeof pubToDn[req.from] === 'undefined') {
// eslint-disable-next-line no-empty-function
Streams.onDisplayName(() => {}, req.from)
}
finalReqs.push({ finalReqs.push({
id, id,
requestorAvatar: pubToAvatar[req.from] || null, requestorAvatar: pubToAvatar[req.from] || null,

View file

@ -55,6 +55,15 @@ const react = () => {
continue continue
} }
if (typeof pubToAvatar[recipientPub] === 'undefined') {
// eslint-disable-next-line no-empty-function
Streams.onAvatar(() => {}, recipientPub)
}
if (typeof pubToDN[recipientPub] === 'undefined') {
// eslint-disable-next-line no-empty-function
Streams.onDisplayName(() => {}, recipientPub)
}
finalSentReqs.push({ finalSentReqs.push({
id: sentReqID, id: sentReqID,
recipientAvatar: pubToAvatar[recipientPub] || null, recipientAvatar: pubToAvatar[recipientPub] || null,