New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

imsdktest

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

imsdktest

imsdk for js

latest
npmnpm
Version
0.0.54
Version published
Maintainers
1
Created
Source

Tmmtmm SDK

Initialize SDK

const sdk = IMSdk.getInstance('你的ak', IMEnvironmentType.alpha);
sdk.setDelegate({
    authCodeExpire(auid) {
        if (constants.authcode.length > 0) {
            sdk.setAuthCode(constants.authcode);
            return;
        }
        onGetAuth().then(() => {
            sdk.setAuthCode(constants.authcode);
        });
    },
    onShowUserinfo(auids) {
        const infos: UserInfo[] = [];
        sdk.setUserInfo(infos);
    },
});

Init User

sdk.initUser(auid)

Create Chat

sdk.createChat({
    aChatId: '会话Id',
    auids: ['用户Id'],
    chatName: '会话名',
    delegate: {
        onSucc: () => {
            console.log('create chat success');
        },
        onError: res => {
            console.log(res);
        },
    },
});

Send Text Message

sdk.sendTextMessage({
    aChatId,  //会话Id
    amid,    //消息Id
    content  //文本内容
})

Send Image Message

sdk.sendImageMessage({
    aChatId,  //会话Id
    amid,    //消息Id
    data  //图片blob文件
})

Send Attachment Message

sdk.sendAttachmentMessage({
    aChatId,  //会话Id
    amid,    //消息Id
    data  //附件blob文件
})

FAQs

Package last updated on 12 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts