Fix opening wrong avatar
This commit is contained in:
parent
d840352168
commit
a2cbf409af
@ -17,6 +17,7 @@ import appAvatarsManager from "../lib/appManagers/appAvatarsManager";
|
|||||||
import AppMediaViewer from "./appMediaViewer";
|
import AppMediaViewer from "./appMediaViewer";
|
||||||
import AppMediaViewerAvatar from "./appMediaViewerAvatar";
|
import AppMediaViewerAvatar from "./appMediaViewerAvatar";
|
||||||
import { NULL_PEER_ID } from "../lib/mtproto/mtproto_config";
|
import { NULL_PEER_ID } from "../lib/mtproto/mtproto_config";
|
||||||
|
import { isObject } from "../helpers/object";
|
||||||
|
|
||||||
const onAvatarUpdate = (peerId: PeerId) => {
|
const onAvatarUpdate = (peerId: PeerId) => {
|
||||||
appAvatarsManager.removeFromAvatarsCache(peerId);
|
appAvatarsManager.removeFromAvatarsCache(peerId);
|
||||||
@ -100,7 +101,7 @@ export async function openAvatarViewer(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(photo) {
|
if(photo) {
|
||||||
if(typeof(message) === 'string') {
|
if(!isObject(message)) {
|
||||||
photo = appPhotosManager.getPhoto(message);
|
photo = appPhotosManager.getPhoto(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user