summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-03-05 21:27:45 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-03-05 21:27:45 +0300
commit58b2980b6924e2d96113bcae2324dc36f952fc7f (patch)
treeb72edd5be6de2724a44965e00d35490b9dcb1d4a
parent052f16885700688f8f72be46d1d21e3541ae85df (diff)
Jabber: cause HTTP upload can be enabled only manually, we try it first, and picture inlining only then
-rw-r--r--protocols/JabberG/src/jabber_ft.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/protocols/JabberG/src/jabber_ft.cpp b/protocols/JabberG/src/jabber_ft.cpp
index 18dd282611..ecd8642c76 100644
--- a/protocols/JabberG/src/jabber_ft.cpp
+++ b/protocols/JabberG/src/jabber_ft.cpp
@@ -99,14 +99,6 @@ void CJabberProto::FtInitiate(const char* jid, filetransfer *ft)
if (wchar_t *p = wcsrchr(filename, '\\'))
filename = p + 1;
- // if we enabled XEP-0231, try to inline a picture
- if (m_bInlinePictures && ProtoGetAvatarFileFormat(ft->std.szCurrentFile.w)) {
- if (FtTryInlineFile(ft->std.hContact, ft->std.szCurrentFile.w)) {
- mir_forkthread(FakeAckThread, ft);
- return;
- }
- }
-
// if we use XEP-0363, send a slot allocation request
if (m_bUseHttpUpload) {
ptrA szUploadService(getStringA("HttpUpload"));
@@ -139,6 +131,15 @@ void CJabberProto::FtInitiate(const char* jid, filetransfer *ft)
}
}
+ // if we enabled XEP-0231, try to inline a picture
+ if (m_bInlinePictures && ProtoGetAvatarFileFormat(ft->std.szCurrentFile.w)) {
+ if (FtTryInlineFile(ft->std.hContact, ft->std.szCurrentFile.w)) {
+ mir_forkthread(FakeAckThread, ft);
+ return;
+ }
+ }
+
+ // no cloud services enabled, try to initiate a p2p file transfer
ft->type = FT_SI;
char sid[9];
for (int i = 0; i < 8; i++)