Add improvements for chat feature

pull/1/head
Thashmi-nil 2 years ago
parent 9ad7438d69
commit 9c3020fc77

@ -20,6 +20,7 @@ package org.wso2.carbon.device.mgt.core.metadata.mgt;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.base.MultitenantConstants;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.common.PaginationRequest;
import org.wso2.carbon.device.mgt.common.PaginationResult;
@ -91,8 +92,12 @@ public class MetadataManagementServiceImpl implements MetadataManagementService
}
try {
MetadataManagementDAOFactory.openConnection();
return metadataDAO.getMetadata(
PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true), metaKey);
if (metaKey.equals("EVALUATE_TENANTS")){
return metadataDAO.getMetadata(MultitenantConstants.SUPER_TENANT_ID, metaKey);
} else {
return metadataDAO.getMetadata(
PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true), metaKey);
}
} catch (MetadataManagementDAOException e) {
String msg = "Error occurred while retrieving the metadata entry for metaKey:" + metaKey;
log.error(msg, e);

Loading…
Cancel
Save