<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">(window.webpackJsonp=window.webpackJsonp||[]).push([[223],{290:function(e,t,a){"use strict";a.r(t),a.d(t,"frontMatter",(function(){return l})),a.d(t,"metadata",(function(){return d})),a.d(t,"rightToc",(function(){return c})),a.d(t,"default",(function(){return p}));var n=a(3),s=a(7),r=(a(0),a(912)),i=a(913),o=["components"],l={id:"responses",title:"Other chat features",sidebar_label:"Other chat features",keywords:["responses"]},d={unversionedId:"chat/react/v2/responses",id:"chat/react/v2/responses",isDocsHomePage:!1,title:"Other chat features",description:"Get Jid based on Username/Userid",source:"@site/docs/chat/react/v2/responses.md",slug:"/chat/react/v2/responses",permalink:"/docs/chat/react/v2/responses",version:"current",sidebar_label:"Other chat features"},c=[{value:"Get Jid based on Username/Userid",id:"get-jid-based-on-usernameuserid",children:[]},{value:"Get GroupJid based on Groupid",id:"get-groupjid-based-on-groupid",children:[]},{value:"Get Message based on MsgId",id:"get-message-based-on-msgid",children:[]},{value:"Emojis",id:"emojis",children:[]},{value:"Translate Message",id:"translate-message",children:[]},{value:"User Settings",id:"user-settings",children:[]},{value:"User Profile Details",id:"user-profile-details",children:[]},{value:"Last Seen Time",id:"last-seen-time",children:[]},{value:"Recent Chat Messages",id:"recent-chat-messages",children:[]},{value:"Single Chat Conversation History Messages",id:"single-chat-conversation-history-messages",children:[]},{value:"Media Messages",id:"media-messages",children:[]},{value:"Reply Message",id:"reply-message",children:[]},{value:"Groups List",id:"groups-list",children:[]},{value:"Group Participants List",id:"group-participants-list",children:[]},{value:"Group Chat Conversation History Messages",id:"group-chat-conversation-history-messages",children:[]},{value:"Group Message Info",id:"group-message-info",children:[]},{value:"Users I Blocked",id:"users-i-blocked",children:[]},{value:"Users Who Blocked Me",id:"users-who-blocked-me",children:[]},{value:"User/Group Blocked/Unblocked By Admin",id:"usergroup-blockedunblocked-by-admin",children:[]},{value:"Get MetaData For User",id:"get-metadata-for-user",children:[]},{value:"Update MetaData For User",id:"update-metadata-for-user",children:[]}],b={rightToc:c};function p(e){var t=e.components,a=Object(s.a)(e,o);return Object(r.b)("wrapper",Object(n.a)({},b,a,{components:t,mdxType:"MDXLayout"}),Object(r.b)(i.a,{permalink:"/docs/chat/react/v2/responses/",mdxType:"LayoutHead"}),Object(r.b)("h3",{id:"get-jid-based-on-usernameuserid"},"Get Jid based on Username/Userid"),Object(r.b)("p",null,"Use the below method to generate your own or others JID using the unique username got in registration response."),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},"\nSDK.getJid(`USER_ID`);\n")),Object(r.b)("h4",{id:"example-request"},"Example Request"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},"SDK.getJid(`123456789`);\n")),Object(r.b)("h4",{id:"example-response"},"Example Response"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},'{\n  statusCode: 200,\n  message: "Success",\n  userJid: "123456789@xmppdomain"\n}\n')),Object(r.b)("h3",{id:"get-groupjid-based-on-groupid"},"Get GroupJid based on Groupid"),Object(r.b)("p",null,"Use the below method to generate your own or others GroupJID using the GroupId."),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},"SDK.getGroupJid(`GROUP_ID`);\n")),Object(r.b)("h4",{id:"example-request-1"},"Example Request"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},"SDK.getGroupJid(`0f617991-08d0-4474-ae6c-f070dc63bb1a`);\n")),Object(r.b)("h4",{id:"example-response-1"},"Example Response"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},'{\n  statusCode: 200,\n  message: "Success",\n  userJid: "0f617991-08d0-4474-ae6c-f070dc63bb1a@mix.xmppdomain"\n}\n')),Object(r.b)("h3",{id:"get-message-based-on-msgid"},"Get Message based on MsgId"),Object(r.b)("p",null,"Use the below method to get the message using the messageId which you got."),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},"\nSDK.getMessageById(`MSG_ID`);\n")),Object(r.b)("h4",{id:"example-request-2"},"Example Request"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},"SDK.getMessageById(`815f37b5-1f8f-4a39-8237-247c44b1b521`);\n")),Object(r.b)("h4",{id:"example-response-2"},"Example Response"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},'{\n  statusCode: 200,\n  message: "Success",\n  data:{ \n    chatType: "", // String - Chat Type - "chat" - Single - "groupchat" - Group\n    createdAt: "", // String - CreatedAt - "2023-04-11 09:23:52"\n    deleteStatus: 0, // Number - Delete Status\n    deletedBy: "0", // String - Deleted By\n    fromUserId: "", // String - From User Id\n    fromUserJid: "", // String - From User Jid -\n                     // Will Be Same as PublisherJid in Case of Single Chat\n                     // GroupJid in Case of Group Chat\n    msgBody: {\n      message: \'\', // String - Message Body\n      message_type: \'\', // String - Message Type text, image, video, audio &amp; file\n      mentionedUsersIds: [], // Array - Mentioned Ids In case of Group\n      nickName: \'\', // String - User Nickname\n    }\n    msgId: "", // String - Message Id\n    msgStatus: 2, // Number - Message Status\n    msgType: "", // String - value ""\n    profileUpdatedStatus: "" // String \n    publisherJid: "", // String - Jid - PublisherJid\n    publisherId: "", // String - Id - Publisher Id\n    timestamp: 1681185232000, // Number - TimeStamp - Milliseconds\n    userId: "", // String - UserId\n    userJid: "", // String - UserJid\n  },\n}\n')),Object(r.b)("h3",{id:"emojis"},"Emojis"),Object(r.b)("p",null,"Our service allows you to send emojis of any kind, without any encryption."),Object(r.b)("h3",{id:"translate-message"},"Translate Message"),Object(r.b)("h4",{id:"get-all-available-translate-languages"},"Get All Available Translate Languages"),Object(r.b)("p",null,"Retrives all Available languages for the Translate from the Google API."),Object(r.b)("div",{className:"admonition admonition-caution alert alert--warning"},Object(r.b)("div",{parentName:"div",className:"admonition-heading"},Object(r.b)("h5",{parentName:"div"},Object(r.b)("span",{parentName:"h5",className:"admonition-icon"},Object(r.b)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16"},Object(r.b)("path",{parentName:"svg",fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"}))),"caution")),Object(r.b)("div",{parentName:"div",className:"admonition-content"},Object(r.b)("p",{parentName:"div"},"If Translation feature is unavailable for your plan, then it will throw 403 exception"))),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},"SDK.getTranslateLanguages(`API_KEY`, `TARET_LANGUAGE`);\n")),Object(r.b)("h4",{id:"example-request-3"},"Example Request"),Object(r.b)("p",null,"Retrives the Translated Text for the provided Text with Target Language."),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},"SDK.getTranslateLanguages(`AIza******************`, `en`);\n")),Object(r.b)("p",null,"Response:"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},'{\n  statusCode: 200,\n  message: "Success",\n  data: {\n    languages: [\n      {\n        language: "af" name: "Afrikaans"\n      },\n      {\n        language: "sq", name: "Albanian"\n      },\n      //...\n    ]\n  }\n}\n\n')),Object(r.b)("h4",{id:"translate-the-message"},"Translate the Message"),Object(r.b)("div",{className:"admonition admonition-caution alert alert--warning"},Object(r.b)("div",{parentName:"div",className:"admonition-heading"},Object(r.b)("h5",{parentName:"div"},Object(r.b)("span",{parentName:"h5",className:"admonition-icon"},Object(r.b)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16"},Object(r.b)("path",{parentName:"svg",fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"}))),"caution")),Object(r.b)("div",{parentName:"div",className:"admonition-content"},Object(r.b)("p",{parentName:"div"},"If Translation feature is unavailable for your plan, then it will throw 403 exception"))),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},"SDK.translateText(`API_KEY`, `MESSAGE_TO_TRANSLATE`, `TARET_LANGUAGE`);\n")),Object(r.b)("h4",{id:"example-request-4"},"Example Request"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},"SDK.translateText(`AIza******************`, `Hello, This is Sample Text`, `ta`);\n")),Object(r.b)("p",null,"Response:"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},'{\n  statusCode: 200,\n  message: "Success",\n  data: {\n    translations: [\n      {\n        detectedSourceLanguage: "ta",\n        translatedText: "\u0bb5\u0ba3\u0b95\u0bcd\u0b95\u0bae\u0bcd"\n      }\n    ]\n  }\n}\n\n')),Object(r.b)("h3",{id:"user-settings"},"User Settings"),Object(r.b)("p",null,"Handles User Settings for Archived Chats."),Object(r.b)("h4",{id:"get-user-settings"},"Get User Settings"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},"await SDK.getUserSettings();\n")),Object(r.b)("h4",{id:"response-format"},"Response Format:"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},"data: {\n  archive: 1 // Number  1 - Permanent / - 0 - Temporary\n}\n")),Object(r.b)("h4",{id:"update-user-settings"},"Update User Settings"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},"await SDK.updateUserSettings(`IS_PERMANENT_ACHIVE_ENABLED`);\n")),Object(r.b)("h4",{id:"request-params"},"Request Params"),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Status"),Object(r.b)("th",{parentName:"tr",align:null},"Description"),Object(r.b)("th",{parentName:"tr",align:"center"},"Type"),Object(r.b)("th",{parentName:"tr",align:"center"},"Required"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("inlineCode",{parentName:"td"},"IS_PERMANENT_ACHIVE_ENABLED")),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("inlineCode",{parentName:"td"},"true")," - Permanent, ",Object(r.b)("inlineCode",{parentName:"td"},"false")," - Temporary"),Object(r.b)("td",{parentName:"tr",align:"center"},"Boolean"),Object(r.b)("td",{parentName:"tr",align:"center"},"true")))),Object(r.b)("h3",{id:"user-profile-details"},"User Profile Details"),Object(r.b)("p",null,"Handles User Profile Respone, when ",Object(r.b)("a",{parentName:"p",href:"/docs/chat/react/v2/profile#get-user-profile-detail"},"Get User Profile")," method called. Receives object values."),Object(r.b)("h4",{id:"response-format-1"},"Response Format:"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},'data: {\n  email: "", // String - User Email\n  image: "", // String - User Profile Image\n  thumbImage: "", // String - User Profile ThumbImage\n  fromUser: "", // String - From User Jid\n  nickName: "", // String - User Nickname\n  mobileNumber: "", // String - User Mobile Number\n  userStatus: "", // String - Use Profile Status\n}\n\n')),Object(r.b)("h3",{id:"last-seen-time"},"Last Seen Time"),Object(r.b)("p",null,"Handles Last Seen Time Respone, when ",Object(r.b)("a",{parentName:"p",href:"/docs/chat/react/v2/profile#get-users-last-seen-time"},"Get Last Seen")," method called. Receives object values."),Object(r.b)("h4",{id:"response-format-2"},"Response Format:"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},'data: {\n  fromUserJid: "", // String - From User Jid\n  seconds: 0, // Number - In Seconds\n}\n')),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Note: If the seconds is ",Object(r.b)("inlineCode",{parentName:"p"},"0"),", then the requested user is ",Object(r.b)("inlineCode",{parentName:"p"},"Online"))),Object(r.b)("h3",{id:"recent-chat-messages"},"Recent Chat Messages"),Object(r.b)("p",null,"Handles Recent Chat Respones, when ",Object(r.b)("a",{parentName:"p",href:"/docs/chat/react/v2/single-chat#get-recent-chats"},"Get Recent Chats")," method called. Receives an array of object values."),Object(r.b)("h4",{id:"response-format-3"},"Response Format:"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},'data: [\n  {\n    msgBody: {\n      media: { // For Media Message Only\n        caption: "", // String - Media Caption\n        duration: "", // String - Duration - For Audio/Videos\n        fileName: "", // String - File Name\n        file_size: "", // Number - File Size\n        file_url: "", // String - File Url\n        is_downloaded: "", // Number - Downloaded Status\n        is_uploading: "", // Number - Uploading Status\n        local_path: "", // String - Local Path\n        thumb_image: "", // Base64 - Thumb Image\n      }\n      message: "", // String - Message Body\n      message_type: "" // String - Message Type\n      mentionedUsersIds: [] // Array - Mentioned Ids For groupChat\n      nickName: "Rizwan" // String - User Name\n    },\n    msgId: "", // String - Unique Message Id\n    toUserId: "", // String - To User Id\n    fromUserId: "", // String - From User Id\n    msgType: "", // String - Message Type\n    publisherId: "", // String - Publisher Id\n    msgStatus: "", // Number - Message Status\n    unreadCount: "", // Number - Unread Message Count\n    deleteStatus: "", // Number - Delete Status (Recall)\n    createdAt: "", // String - Created Time\n    timestamp: 1681185232000, // Number - TimeStamp - Milliseconds\n    chatType: "", // String - Chat Type "chat"/"groupchat"\n    updatedAt: "", // String - Updated Time\n    userId: "", // String - Notification To\n    muteStatus: 0, // Number - Mute Status\n    archiveStatus: 0 // Number - Archive Status\n  },\n  //...\n];\n')),Object(r.b)("h3",{id:"single-chat-conversation-history-messages"},"Single Chat Conversation History Messages"),Object(r.b)("p",null,"Handles Single Chat Respones, when ",Object(r.b)("a",{parentName:"p",href:"/docs/chat/react/v2/single-chat#get-chat-messages"},"Get Chat Messages")," method called. Receives an array of object values."),Object(r.b)("h4",{id:"response-format-4"},"Response Format:"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},'userJid: "", // String - Requested User Jid\ndata: [\n  {\n    deleteStatus: "", // Number - Delete Status\n    favouriteBy: "", // String - Favourited By - User\n    favouriteStatus: "", // String - Favourite Status\n    fromUserId: "", // String - From User Id\n    msgBody: {\n      media: { // For Media Message Only\n        caption: "", // String - Media Caption\n        duration: "", // String - Duration - For Audio/Videos\n        fileName: "", // String - File Name\n        file_size: "", // Number - File Size\n        file_url: "", // String - File Url\n        is_downloaded: "", // Number - Downloaded Status\n        is_uploading: "", // Number - Uploading Status\n        local_path: "", // String - Local Path\n        thumb_image: "", // Base64 - Thumb Image\n      }\n      message: "", // String - Message Body\n      message_type: "" // String - Message Type\n    },\n    fromUserJid: "", // String - From User Jid\n    msgId: "", // String - Unique Message Id\n    msgStatus: "", // String - Message Status\n    createdAt: "", // String - Message Created Time\n    timestamp: 1681185232000, // Number - TimeStamp - Milliseconds\n    rowId: "", // String - Table Row Id - Used for Fetching Next Paginated Messages\n    chatType: "", // String - Chat Type - "chat"\n  },\n  //...\n];\n')),Object(r.b)("h3",{id:"media-messages"},"Media Messages"),Object(r.b)("p",null,"Handles Single/Group Chat Media Respones, when ",Object(r.b)("a",{parentName:"p",href:"/docs/chat/react/v2/single-chat#get-media-messages"},"Get Media Messages")," method called. Receives an array of object values."),Object(r.b)("h4",{id:"response-format-5"},"Response Format:"),Object(r.b)("p",null,"Sample Response:"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},'data: [\n  {\n    msgId: "", // String - Message Id\n    message_type: "", // String - Message Type\n    chatype: "", // String - Chat Type - Values "chat"/"groupchat"\n    message: "", // String - Message Object\n    media: {\n      caption: "", // String - Media Caption\n      duration: "", // String - Duration - For Audio/Videos\n      fileName: "", // String - File Name\n      file_size: "", // Number - File Size\n      file_url: "", // String - File Url\n      is_downloaded: "", // Number - Downloaded Status\n      is_uploading: "", // Number - Uploading Status\n      local_path: "", // String - Local Path\n      thumb_image: "", // Base64 - Thumb Image\n    },\n    timestamp: 1681185232000, // Number - TimeStamp - Milliseconds\n  },\n  //...\n];\n')),Object(r.b)("h3",{id:"reply-message"},"Reply Message"),Object(r.b)("p",null,"Handles Reply Message Respones, when ",Object(r.b)("a",{parentName:"p",href:"/docs/chat/react/v2/single-chat#get-reply-message"},"Get Reply Messages")," method called. Receives object values."),Object(r.b)("h4",{id:"response-format-6"},"Response Format:"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},'data: {\n    chatType: "", // String - Chat Type\n    deletedStatus: "", // Number - Delete Status\n    deletedBy: "", // String - Deleted By\n    fromUserId: "", // String - Reply From User Id\n    oldMsgId: "", // String - Old Message Id\n    replyMsgContent: "", // String - Reply Message Content\n    replyMsgId: "", // String - Reply Message Id\n  }\n')),Object(r.b)("h3",{id:"groups-list"},"Groups List"),Object(r.b)("p",null,"Handles Groups lists Respones, when ",Object(r.b)("a",{parentName:"p",href:"/docs/chat/react/v2/group-chat#get-all-groups"},"Get All Groups")," method called. Receives an array of object values.1"),Object(r.b)("h4",{id:"response-format-7"},"Response Format:"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},'data: [\n  {\n    itemId: "", // String - Item Id - Unique Id for the Group Member\n    groupId: "", // String - Group Id\n    groupJid: "", // String - Group Jid\n    groupName: "", // String - Group Name\n    groupImage: "", // String - Group Image\n    thumbImage: "", // String - Group ThumbImage\n    timestamp: 1681185232000, // Number - Group Created Timestamp -Milliseconds\n    userType: "", // Number - User Type - "o" - Admin of the Group / "n" - Member of the Group\n    isAdminBlocked: false // Boolean - If true - Group is blocked by Admin\n  },\n  //...\n];\n')),Object(r.b)("h3",{id:"group-participants-list"},"Group Participants List"),Object(r.b)("p",null,"Handles Groups Participants list Respones, when ",Object(r.b)("a",{parentName:"p",href:"/docs/chat/react/v2/group-chat#get-group-participants"},"Get Group Participant")," method called. Receives an array of object values."),Object(r.b)("h4",{id:"response-format-8"},"Response Format:"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},'data: {\n  groupJid: "" // String Group Jid\n  participants: [\n    {\n      isAdminBlocked: false // Boolean - Admin Blocked or not\n      itemId: "", // String - Item Id - Unique Id for the Participant for Group\n      userId: "", // String - User Id (Without Domain)\n      userJid: "", // String - User Jid (With Domain)\n      userType: "", // String - User Type - value "o" - Admin of the Group/ "n" -Member of the Group\n      userProfile: {\n        image: "", // String - User Image\n        nickName: "", // String - User Nick Name\n        name: "", // String - User Name\n        email: "", // String - User Email\n        status: "", // String - User Status\n        mobileNumber: "", // String - User Mobile Number\n        thumbImage: "" // String - User ThumbImage\n      },\n      timestamp: 1681185232000 // Number TimeStamp - Milliseconds\n   },\n  ]\n  //...\n};\n')),Object(r.b)("h3",{id:"group-chat-conversation-history-messages"},"Group Chat Conversation History Messages"),Object(r.b)("p",null,"Handles Group Chat Messages Respones, when ",Object(r.b)("a",{parentName:"p",href:"/docs/chat/react/v2/single-chat#get-chat-messages"},"Get Chat Messages")," method called. Receives an array of object values."),Object(r.b)("h4",{id:"response-format-9"},"Response Format:"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},'groupJid: "", // String - Requested Group Jid\ndata: [\n  {\n    msgId: "", // String - Unique Message Id\n    groupId: "", // String - Group Id\n    createdAt: "", // String - Message Created Time\n    fromUserId: "", // String - From User Id\n    userId: "", // String - User Id\n    msgBody: {\n      media: { // For Media Message Only\n        caption: "", // String - Media Caption\n        duration: "", // String - Duration - For Audio/Videos\n        fileName: "", // String - File Name\n        file_size: "", // Number - File Size\n        file_url: "", // String - File Url\n        is_downloaded: "", // Number - Downloaded Status\n        is_uploading: "", // Number - Uploading Status\n        local_path: "", // String - Local Path\n        thumb_image: "", // Base64 - Thumb Image\n      }\n      message: "", // String - Message Body\n      message_type: "" // String - Message Type\n    },\n    favouriteBy: "", // String - Favourited By - User\n    msgStatus: "", // String - Message Status\n    timestamp: 1681185232000, // Number - TimeStamp - Milliseconds\n    deleteStatus: "", // Number - Delete Status\n    status: "", // String - Group Message Status\n    msgType: "", // String - Group Message Type\n    rowId: "", // String - Table Row Id - Used for Fetching Next Paginated Messages\n    chatType: "", // String - Chat Type - "chat"\n  },\n  //...\n];\n')),Object(r.b)("h3",{id:"group-message-info"},"Group Message Info"),Object(r.b)("p",null,"Handles Group Message Info Respones, when ",Object(r.b)("a",{parentName:"p",href:"/docs/chat/react/v2/group-chat#get-group-message-info"},"Get Group Message Info")," method called. Receives an array of object values."),Object(r.b)("h4",{id:"response-format-10"},"Response Format:"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},'data: {\n  groupJid: "", // String - Group Jid (With Domain)\n  msgId: "", // String - Message Id\n  participants: [\n    {\n      userId: "", // String - User Id\n      msgStatus: "", // String - Message Status - 0 Not Delivered, 1- Delivered, 2 - Seen\n      deliveredTime: "", // String - Message Delivered Time "0000-00-00 00:00:00"\n      seenTime: "", // String - Message Seen Time "0000-00-00 00:00:00"\n    },\n    //...\n  ]\n}\n')),Object(r.b)("h3",{id:"users-i-blocked"},"Users I Blocked"),Object(r.b)("p",null,"Handles Blocked List IQs (Users who are all blocked by the current user), triggered when ",Object(r.b)("a",{parentName:"p",href:"/docs/chat/react/v2/profile#get-users-i-blocked"},"Get Users I Blocked")," method called. Receives an array of object values."),Object(r.b)("h4",{id:"response-format-11"},"Response Format:"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},'[\n  {\n    jid: "", // String - Jid of the User\n  },\n  //...\n];\n')),Object(r.b)("h3",{id:"users-who-blocked-me"},"Users Who Blocked Me"),Object(r.b)("p",null,"Handles Blocked Users List IQs (Users who have blocked the current user), triggered when ",Object(r.b)("a",{parentName:"p",href:"/docs/chat/react/v2/profile#get-users-who-blocked-me"},"Get Users Who Blocked Me")," method called. Receives an array of object values."),Object(r.b)("h4",{id:"response-format-12"},"Response Format:"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},'[\n  {\n    jid: "", // String - Jid of the User\n  },\n  //...\n];\n')),Object(r.b)("h3",{id:"usergroup-blockedunblocked-by-admin"},"User/Group Blocked/Unblocked By Admin"),Object(r.b)("p",null,"Handles Blocked/Unblocked response from Admin Console for the user/group. This response is triggered when the console admin particularly blocks/unblocks an user/group in Callback ",Object(r.b)("a",{parentName:"p",href:"/docs/chat/react/v2/callback-listeners#admin-usergroup-blockunblock-listener"},"adminBlockListener"),". Receives Blocked User/groups 's UserId and Jid with blocked status. "),Object(r.b)("h4",{id:"response-format-13"},"Response Format:"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},'\n  { \n    chatType: "", // String - either Group or Single Chat\n    toUserJid: "", // String - Blocked User/Group\'s Jid\n    blockStatus: "", // string - User/Group\'s  Blocked Status (either 1(true) or 0(false)) \n    toUserId: "", // String - Blocked User/Group\'s User-ID \n    type: "" // String\n  } \n\n')),Object(r.b)("h3",{id:"get-metadata-for-user"},"Get MetaData For User"),Object(r.b)("p",null,"Use the below method to get your own metaData."),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},"await SDK.getMetaData();\n")),Object(r.b)("h4",{id:"example-response-3"},"Example Response"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},'{\n  statusCode: 200,\n  message: "Data Retrieved Successfully",\n  metaData: \n  {  \n    type:"test",\n    phone:"1234567890"\n  }\n}\n')),Object(r.b)("h3",{id:"update-metadata-for-user"},"Update MetaData For User"),Object(r.b)("p",null,"Use the below method to update your own metaData."),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},"await SDK.updateMetaData(`Update_MetaData`);\n")),Object(r.b)("h4",{id:"request-param"},"Request Param"),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Status"),Object(r.b)("th",{parentName:"tr",align:null},"Description"),Object(r.b)("th",{parentName:"tr",align:"center"},"Type"),Object(r.b)("th",{parentName:"tr",align:"center"},"Required"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("inlineCode",{parentName:"td"},"Update_MetaData")),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("inlineCode",{parentName:"td"},"Update_MetaData")," is an optional parameter to update MetaData of user. ",Object(r.b)("inlineCode",{parentName:"td"},"Maximum size is 3")),Object(r.b)("td",{parentName:"tr",align:"center"},"Object"),Object(r.b)("td",{parentName:"tr",align:"center"},"false")))),Object(r.b)("h4",{id:"request-input-for-update_metadata"},"Request Input for Update_MetaData"),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Arguments"),Object(r.b)("th",{parentName:"tr",align:null},"Description"),Object(r.b)("th",{parentName:"tr",align:"center"},"Type"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"key"),Object(r.b)("td",{parentName:"tr",align:null},"Name of the Key"),Object(r.b)("td",{parentName:"tr",align:"center"},"String")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"value"),Object(r.b)("td",{parentName:"tr",align:null},"Name of the value"),Object(r.b)("td",{parentName:"tr",align:"center"},"String or Boolean or Number")))),Object(r.b)("h4",{id:"example-response-4"},"Example Response"),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},'{\n  statusCode: 200,\n  message: "User Successfully Updated",\n  metaData:\n  {    \n    method:"update"\n  }\n}\n')),Object(r.b)("div",{className:"admonition admonition-note alert alert--secondary"},Object(r.b)("div",{parentName:"div",className:"admonition-heading"},Object(r.b)("h5",{parentName:"div"},Object(r.b)("span",{parentName:"h5",className:"admonition-icon"},Object(r.b)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"},Object(r.b)("path",{parentName:"svg",fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))),"note")),Object(r.b)("div",{parentName:"div",className:"admonition-content"},Object(r.b)("p",{parentName:"div"},"You didn't pass param (Update_MetaData) to updateMetaData SDK method, it should be considered as a null and updated user MetaData as a null."))))}p.isMDXComponent=!0}}]);</pre></body></html>