优化头像兼容

This commit is contained in:
超级老白兔
2025-10-27 11:48:22 +08:00
parent 3ff3e40d8e
commit 8b28194d00

View File

@@ -45,7 +45,7 @@ const MessageRecord: React.FC<MessageRecordProps> = ({ contract }) => {
const prevMessagesRef = useRef(currentMessages);
const updateShowCheckbox = useWeChatStore(state => state.updateShowCheckbox);
const updateEnterModule = useWeChatStore(state => state.updateEnterModule);
const currentKf = useCustomerStore(state =>
const currentCustomer = useCustomerStore(state =>
state.customerList.find(kf => kf.id === contract.wechatAccountId),
);
@@ -639,7 +639,7 @@ const MessageRecord: React.FC<MessageRecordProps> = ({ contract }) => {
<Avatar
size={32}
src={currentKf.avatar}
src={currentCustomer?.avatar || ""}
icon={<UserOutlined />}
className={styles.messageAvatar}
/>