/******************************

> 应用名称：Nicegram

*******************************

[rewrite_local]

^https?:\/\/nicegram\.cloud\/api\/v\d\/(ai-assistant\/purchase-list|user\/info|telegram\/auth) url script-response-body https://git.vsprit.com/shawenguan/Quantumult-X/raw/master/Scripts/nicegram/nicegram.js

[MITM]

hostname=nicegram.cloud

********************************/

function doUnlockPremium() {
    console.log('Nicegram Premium已解锁😎');
    const data = JSON.parse(typeof $response != "undefined" && $response.body || null);
    if(data.status == 200 && data.data){
        const user = data.data.user;
        user['subscription'] =  true;
        user['store_subscription'] =  true;
        user['lifetime_subscription'] =  true;
    }
    $done({ body: JSON.stringify(data) });
}
doUnlockPremium();
