
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-native-chatvt
Advanced tools
Chat VT SDK
npm install react-native-chatvt
import {chatVT} from 'react-native-chatvt';
import AsyncStorage from "@react-native-async-storage/async-storage";
chatVT.init(env, AsyncStorage, lang, appId, token, tokenSSO, onSuccess?, onError?)
// appId: "VTMan", "VTPost"
// env: môi trường "DEV", "UAT", "PRODUCT"
// lang là ngôn ngữ enum('VN', 'EN')
// token, token_sso: do bên Viettel Posst cung cấp
import {chatVT} from 'react-native-chatvt';
import AsyncStorage from "@react-native-community/async-storage";
chatVT.init(env, AsyncStorage, lang, appId, token, tokenSSO, onSuccess?, onError?)
// appId: "VTMan", "VTPost"
// env: môi trường "DEV", "UAT", "PRODUCT"
// lang là ngôn ngữ enum('VN', 'EN')
// token, token_sso: do bên Viettel Posst cung cấp
import {chatVT} from 'react-native-chatvt';
import AsyncStorage from "@react-native-async-storage/async-storage";//<- chú ý thư viện 2 app khác nhau
export default function App(props: any) {
const AppId = "VTPost"
const [auth, setAuth] = useState(false)
useEffect(() => {
chatVT.init(
"DEV",
AsyncStorage,
"VN",
AppId,
'eyJhbGciOiJFUzI1NiJ9.eyJzdWIiOiIwMzI3NDk3OTk2IiwiU1NPSWQiOiJkZmMxYmFjYy1jNjE4LTRkNDctOTBhZS1jZDRmMTMzMDNmM2MiLCJVc2VySWQiOjcyNDEyOTgsIkZyb21Tb3VyY2UiOjMsIlRva2VuIjoiNEU2QzAyRUVGODU4MkYxNDMwMkU1Q0NBMEM1MjEzMDkiLCJleHAiOjE3MTg1MjY2NDEsIlBhcnRuZXIiOjY5MzU5MzF9.4hvyYpPN6ABdGXi0Imjoqi18Luxo9xokg7GFPT_iczfqSEQ-VXzG-KCjL__SB5O77ZU1SohGEOvxbMpgXEQoMA',
'eyJhbGciOiJSUzI1NiIsImtpZCI6IjEzODFCMzg2OUFGRDlBRTU4ND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bB5X2FQRlEjABje2keNxqwj5R7kZX13C6J_0JvdV9DPtE_aSHkM5kW3M5elOQq6Z7E48xHHQF3gM1y5AWuPquBeg_AO05sfBRxUlzMjYdHTjn0isZ7BPJlCQXMaUP_kFYRQmjkkEZpx5dFdgVZK8FaO2Q'
, () => {
setAuth(true)
})
})
return (<>
{
auth?
<SafeAreaView style={{padding: 16}}>
<Button
onPress={(() => {
/** Mở màn hình danh sách chat */
chatVT.toListChat(props.componentId)
})}
title={'List chat'}>
</Button>
<View style={{height: 16}}/>
<Button
onPress={(() => {
/** VTP tạo chat với bưu tá */
chatVT.toChat(props.componentId, {
/** vtm_user_ids: mảng gồm id của bưu tá */
/** order_number: mã vận đơn */
vtm_user_ids: [
985979
],
order_number: '1694287621393'
})
// /** VTM tạo chat với khách hàng */
// chatVT.toChat(props.componentId, {
// /** vtm_user_ids: mảng gồm id của bưu tá */
// /** order_number: mã vận đơn */
// vtp_user_ids: [
// 985979
// ],
// order_number: '1694287621393'
// })
})}
title={'Chat Detail'}>
</Button>
</SafeAreaView>
:
<Text> Đang xác thực tài khoản</Text>
}
</>
)
}
import {chatVT} from 'react-native-chatvt';
import AsyncStorage from "@react-native-community/async-storage"; //<- chú ý thư viện 2 app khác nhau
export default function App(props: any) {
const AppId = "VTMan"
const [auth, setAuth] = useState(false)
useEffect(() => {
chatVT.init(
"DEV",
AsyncStorage,
"VN",
AppId,
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyaWQiOiI5ODU5NzkiLCJ1c2VybmFtZSI6Im5ndW9udGVzdDEiLCJtYV9idXVjdWMiOiJUTjIiLCJuYW1lIjoiVGVzdCAxIiwicGhvbmUiOiI4NDM4ODAyMjA3MSIsImRvbl92aSI6IlRDVCIsIm1hX2NodWNkYW5oIjoiVlRCMDA5IiwiaXNzIjoiLTEwIiwiZW1wbG95ZWVfZ3JvdXBfaWQiOiI0Iiwic291cmNlIjoiLTEwIiwic291cmNlMiI6IiIsInRva2VuIjoiZWE4MGY3MmMtYmNmYy00OGRmLTk1NWMtMTM1ZmY2NDgzMWU1IiwidG9rZW4yIjoiIiwiY2FwX2J1dWN1YyI6IjUwIiwibG9ja19kdCI6IjAiLCJtYW5oYW52aWVuIjoiSTI3MDQxNzIyIiwiY2hpX25oYW5oIjoiVENUIiwidnVuZyI6IjEyIiwiZXhwIjoiMTY4ODAzOTM5MDk4MSIsImRuX3VzZXJpZCI6IjMxNjgyIn0.BW7UAD8ecYVDywNhRjIAhXSy5pGqcfWvtf19EeNkJnE',
''
, () => {
setAuth(true)
})
})
return (<>
{
auth?
<ListChat {...props} buttonBack={false}/>
:
<Text> Đang xác thực tài khoản</Text>
}
</>
)
}
// BottomSheet hiển thị options chat với ngừoi gửi, nhận, bưu tá gửi, bưu tá nhận
import {BottomSheetChat} from 'react-native-chatvt';
export default function MyScreen() {
const bottomSheetChatRef = useRef();
const onMessage = ()=>{
// Cập nhật thông tin đơn hàng đã chọn vào BottomSheet
bottomSheetChatRef?.current?.updateData(
//Danh sách bưu tá
res,
//Chi tiết đơn hàng
orderSelected,
//Tab Đơn gửi hay đơn nhận
tabSelected,
// Đơn gửi hay đơn nhận SENDER/RECEIVER
'SENDER'
);
// Hiện Bottomsheet
bottomSheetChatRef.current?.present();
}
...
return(
<View>
...
<BottomSheetChat
// ref
ref={bottomSheetChatRef}
// Navigation componentId
componentId={props.componentId}
/>
</View>
)
}
// BottomSheet hiển thị options chat với ngừoi gửi, nhận, bưu tá gửi, bưu tá nhận
import {BottomSheetChatVTM} from 'react-native-chatvt';
export default function MyScreen() {
const bottomSheetChatRef = useRef();
const onMessage = ()=>{
// Cập nhật thông tin đơn hàng đã chọn vào BottomSheet
bottomSheetChatRef?.current?.updateData(
//Danh sách bưu tá
res,
//Chi tiết đơn hàng
orderSelected,
//Tab Đơn gửi hay đơn nhận 4 / 1
tabSelected,
// Đơn gửi hay đơn nhận SENDER/RECEIVER
'SENDER'
);
// Hiện Bottomsheet
bottomSheetChatRef.current?.present();
}
...
return(
<View>
...
<BottomSheetChatVTM
// Navigation ComponentId
componentId={this.props.parentComponentId}
// ref
ref={(ref) => (this.bottomSheetChatRef = ref)} />
</View>
)
}
import {chatVT} from 'react-native-chatvt';
const chatProcess = (data) => {
try {
// Lấy ref từ data của thông báo
const { ref } = data;
let eToken = UserData?.userInfo?.tokenKey;
let sToken = UserData?.userInfo?.tokenSSO;
chatVT.handleNotification(
'DEV',
AsyncStorage,
'VN',
'VTPost',
eToken,
sToken,
() => {},
() => {},
//Navigation componentId
StackScreen.componentId,
//Conversation Id lọc từ ref
ref?.replace('group:', ''),
);
} catch (error) {
console.log(error);
}
};
import {chatVT} from 'react-native-chatvt';
chatVT.handleNotification(
"DEV",
AsyncStorage,
"VN",
"VTMan",
TKModelData.tokenVTMan,
'',
() => {},
() => {},
// Navigation componentId
TKModelData.last_componentid,
// Conversation Id lọc từ dữ liệu noitification
data?.additionalProp1
);
MIT
FAQs
test
We found that react-native-chatvt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.