From 2df61218b674051f3ffef5ce2135007d81768361 Mon Sep 17 00:00:00 2001 From: Lutkin Wang Date: Fri, 5 Feb 2021 17:10:37 +0800 Subject: [PATCH] Update AgoraRTMlDlg.cpp Fix issue: Cannot login RTM with token because token is not acquired from the ini file Token auth is the recommended method and should be explicitly supported in demo projects --- .../AgoraRTMTutorial/AgoraRTMlDlg.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Agora-RTM-Tutorial-Windows/AgoraRTMTutorial/AgoraRTMlDlg.cpp b/Agora-RTM-Tutorial-Windows/AgoraRTMTutorial/AgoraRTMlDlg.cpp index fcbce89..68e2b90 100644 --- a/Agora-RTM-Tutorial-Windows/AgoraRTMTutorial/AgoraRTMlDlg.cpp +++ b/Agora-RTM-Tutorial-Windows/AgoraRTMTutorial/AgoraRTMlDlg.cpp @@ -174,13 +174,12 @@ void CAgoraRTMDlg::OnBnClickedButtonLogin() } m_account = cs2s(strAccount); - std::string appId = m_pRTMInstance->getAppId(); std::string appCertificateId = m_pRTMInstance->getCertificateId(); time_t ltime; time(<ime); int expiredSecond = ltime + 3600; - m_pRTMInstance->Login(m_account, appId); + m_pRTMInstance->Login(m_account, appCertificateId); } void CAgoraRTMDlg::initCtrl() @@ -198,7 +197,7 @@ void CAgoraRTMDlg::initResource() gConfigSignal.setAppID(""); std::string ConfigPath = gConfigSignal.getFilePath(); ShellExecute(NULL, _T("open"), s2cs(ConfigPath), NULL, NULL, SW_SHOW); - AfxMessageBox(_T("APPID can not be empty ,Please modify the AppID and AppCertificatedId in the AgoraSignal.ini configuration item")); + AfxMessageBox(_T("APPID can not be empty ,Please modify the AppID and AppCertificatedId in the AgoraRTM.ini configuration item")); PostQuitMessage(0); return; } @@ -314,4 +313,4 @@ BOOL CAgoraRTMDlg::PreTranslateMessage(MSG* pMsg) } return CDialogEx::PreTranslateMessage(pMsg); -} \ No newline at end of file +}