diff options
author | George Hazan <george.hazan@gmail.com> | 2025-01-30 13:04:42 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2025-01-30 13:04:42 +0300 |
commit | e183525eec19956eef36e37ef217629640ce500a (patch) | |
tree | 71409f356853e8f17451e8b66e191ac7c050cacf /protocols/Weather/src/weather_data.cpp | |
parent | de75a8dab26fe39e941939bed4034e18f6a65486 (diff) |
fixes #4860 (Weather: добавить попап при попытке доступа к API в отсутствие ключа)
Diffstat (limited to 'protocols/Weather/src/weather_data.cpp')
-rw-r--r-- | protocols/Weather/src/weather_data.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/protocols/Weather/src/weather_data.cpp b/protocols/Weather/src/weather_data.cpp index 5294befb0f..a02ae0dc1f 100644 --- a/protocols/Weather/src/weather_data.cpp +++ b/protocols/Weather/src/weather_data.cpp @@ -248,8 +248,10 @@ void CWeatherProto::ConvertDataValue(WIDATAITEM *p) MHttpResponse* CWeatherProto::RunQuery(const wchar_t *id, int days) { wchar_t *pKey = m_szApiKey; - if (!mir_wstrlen(pKey)) + if (!mir_wstrlen(pKey)) { + WPShowMessage(TranslateT("You need to obtain the personal key and enter it in the account's Options dialog"), SM_WARNING); return nullptr; + } auto *pReq = new MHttpRequest(REQUEST_GET); pReq->flags = NLHRF_HTTP11 | NLHRF_DUMPASTEXT; |