diff options
author | ElzorFox <elzorfox@ya.ru> | 2024-05-07 09:22:50 +0500 |
---|---|---|
committer | ElzorFox <elzorfox@ya.ru> | 2024-05-07 09:22:50 +0500 |
commit | 94092b46fb9c058ca2ed70e16b6fbdf9b5b464b7 (patch) | |
tree | 9e65f1652beb3b63aaebf7bdb461cf19e3d99134 /protocols/VKontakte | |
parent | 630d28997003864c1f8f5f63083e90abfeac97d7 (diff) |
VKontakte: add 'OggInAudioMessages' hidden options (default false)
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_struct.cpp | 1 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_struct.h | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index d24b9f500e..6669fb7adf 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -1327,7 +1327,7 @@ CMStringW CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport if (m_vkOptions.bFilterAudioMessages)
return L"== FilterAudioMessages ==";
- CMStringW wszUrl(jnAudioMessage["link_mp3"].as_mstring());
+ CMStringW wszUrl(jnAudioMessage[m_vkOptions.bOggInAudioMessages ? "link_ogg" : "link_mp3"].as_mstring());
CMStringW wszTranscriptText(jnAudioMessage["transcript"].as_mstring());
res.AppendFormat(L"%s", SetBBCString(TranslateT("Audio message"), iBBC, vkbbcUrl, wszUrl).c_str());
diff --git a/protocols/VKontakte/src/vk_struct.cpp b/protocols/VKontakte/src/vk_struct.cpp index 803c465b5e..f3efb68d0c 100644 --- a/protocols/VKontakte/src/vk_struct.cpp +++ b/protocols/VKontakte/src/vk_struct.cpp @@ -218,6 +218,7 @@ CVKOptions::CVKOptions(PROTO_INTERFACE* proto) : bShowProtoMenuItem6(proto, "ShowProtoMenuItem6", true),
iMusicSendMetod(proto, "MusicSendMetod", MusicSendMetod::sendBroadcastOnly),
+ bOggInAudioMessages(proto, "OggInAudioMessages", false),
bPopupContactsMusic(proto, "PopupContactsMusic", false),
iSyncHistoryMetod(proto, "SyncHistoryMetod", SyncHistoryMetod::syncOff),
bShowBeforeEditedPostVersion(proto, "ShowBeforeEditedPostVersion", true),
diff --git a/protocols/VKontakte/src/vk_struct.h b/protocols/VKontakte/src/vk_struct.h index 9337b61001..1042a7cee4 100644 --- a/protocols/VKontakte/src/vk_struct.h +++ b/protocols/VKontakte/src/vk_struct.h @@ -268,6 +268,7 @@ struct CVKOptions { CMOption<uint8_t> bUseStikersAsStaticSmileys;
CMOption<uint8_t> bUserForceInvisibleOnActivity;
CMOption<uint8_t> iMusicSendMetod;
+ CMOption<uint8_t> bOggInAudioMessages;
CMOption<uint8_t> bPopupContactsMusic;
CMOption<uint8_t> iSyncHistoryMetod;
CMOption<uint8_t> bNewsEnabled;
|