/**
 * git do not control webim.config.js
 * everyone should copy webim.config.js.demo to webim.config.js
 * and have their own configs.
 * In this way , others won't be influenced by this config while git pull.
 *
 */

// for react native
// var location = {
//     protocol: "https"
// }

function getUrl(){
    var apiUrl = (window.location.protocol === "https:" ? "https:" : "http:") + "//a1-hsb.easemob.com"
    var xmppUrl = "im-api.easemob.com"
    if(window.location.href.indexOf("webim-h5.easemob.com") !== -1 || window.location.href.indexOf("localhost") !== -1 || window.location.href.indexOf("172.17.2.168") !== -1){
        apiUrl = (window.location.protocol === "https:" ? "https:" : "http:") + "//a1-hsb-ly.easemob.com"
        xmppUrl = "im-api.easemob.com"
    }
    return {
        apiUrl: apiUrl,
        xmppUrl: xmppUrl
    }
}


var config = {
    /*
     * XMPP server
     */
    xmppURL: "https://im-api-v2.easemob.com", // socket Server地址

    apiURL: "https://a1.easemob.com",// rest Server地址

    appkey: "1134220714096898#demo",// App key

    isHttpDNS: true,// 是否使用https

    https : false,

    isDebug: true,// 打开调试，会自动打印log，在控制台的console中查看log

    autoReconnectNumMax: 1,// 断线重连最大次数

    delivery: true,// 是否发送已读回执

    useOwnUploadFun: false, // 是否使用自己的网址提交
}

