Skip to content

Commit

Permalink
Merge pull request #1005 from haoxiuwen/doc-v2
Browse files Browse the repository at this point in the history
Modify Web ChatUIKit Docs
  • Loading branch information
haoxiuwen authored Oct 25, 2024
2 parents 12fa3b6 + 2338c6c commit 4cc8b2e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/uikit/chatuikit/web/chatuikit_chat.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ const ChatContainer = () => {

// 实现发送自定义消息
const sendCustomMessage = () => {
const customMsg = EasemobChat.message.create({
const customMsg = ChatSDK.message.create({
type: "custom",
to: "targetId", //消息接收方:单聊为对端用户 ID,群聊为群组 ID。
chatType: "singleChat",
Expand Down
16 changes: 8 additions & 8 deletions docs/uikit/chatuikit/web/chatuikit_context.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ import React from "react";
import { useChatContext, useSDK } from "easemob-chat-uikit";

const ChatAPP = () => {
const { easemobChat } = useSDK(); // 获取即时通讯 IM SDK
const { chatSDK } = useSDK(); // 获取即时通讯 IM SDK
const { messages, sendMessage } = useChatContext();
const sendCustomMessage = () => {
const customMsg = easemobChat.message.create({
const customMsg = chatSDK.message.create({
type: "custom",
to: "targetId", // 单聊为对端用户 ID,群组聊天为当前群组 ID。
chatType: "singleChat",
Expand Down Expand Up @@ -215,7 +215,7 @@ const ChatAPP = () => {
    </tr>
    <tr>
        <td>repliedMessage</td>
        <td style=font-size:15px>easemobChat.MessagesType</td>
        <td style=font-size:15px>chatSDK.MessagesType</td>
        <td style=font-size:15px>正在回复的消息</td>
    </tr>
<tr>
Expand All @@ -225,7 +225,7 @@ const ChatAPP = () => {
    </tr>
    <tr>
        <td style=color:blue>sendMessage</td>
        <td style=font-size:15px>(message: easemobChat.MessageBody) => Promise&lt;void&gt;</td>
        <td style=font-size:15px>(message: chatSDK.MessageBody) => Promise&lt;void&gt;</td>
        <td style=font-size:15px>发送消息。</td>
    </tr>
<tr>
Expand All @@ -245,12 +245,12 @@ const ChatAPP = () => {
    </tr>
<tr>
        <td style=color:blue>modifyMessage</td>
        <td style=font-size:15px>(messageId: string, msg: easemobChat.TextMsgBody) => Promise&lt;void&gt;</td>
        <td style=font-size:15px>(messageId: string, msg: chatSDK.TextMsgBody) => Promise&lt;void&gt;</td>
        <td style=font-size:15px>编辑服务器上的消息。编辑后,对端用户会显示修改后的消息。该方法仅对文本消息有效。</td>
    </tr>
<tr>
        <td style=color:blue>modifyLocalMessage</td>
        <td style=font-size:15px>(id: string, message: easemobChat.MessageBody | RecallMessage) => void</td>
        <td style=font-size:15px>(id: string, message: chatSDK.MessageBody | RecallMessage) => void</td>
        <td style=font-size:15px>编辑本地消息。该方法对任何类型的消息均有效。</td>
    </tr>
<tr>
Expand All @@ -265,7 +265,7 @@ const ChatAPP = () => {
    </tr>
<tr>
        <td style=color:blue>setRepliedMessage</td>
        <td style=font-size:15px>(message: easemobChat.MessageBody | null) => void</td>
        <td style=font-size:15px>(message: chatSDK.MessageBody | null) => void</td>
        <td style=font-size:15px>设置回复的消息。</td>
    </tr>
<tr>
Expand Down Expand Up @@ -324,7 +324,7 @@ const ChatAPP = () => {
    </tr>
<tr>
        <td style=color:blue>setGroupMemberAttributes</td>
        <td style=font-size:15px>(groupId: string, userId: string, attributes: easemobChat.MemberAttributes) => void</td>
        <td style=font-size:15px>(groupId: string, userId: string, attributes: chatSDK.MemberAttributes) => void</td>
        <td style=font-size:15px>设置群成员属性。</td>
    </tr>
</table>

0 comments on commit 4cc8b2e

Please sign in to comment.