From 58b2980b6924e2d96113bcae2324dc36f952fc7f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 5 Mar 2020 21:27:45 +0300 Subject: Jabber: cause HTTP upload can be enabled only manually, we try it first, and picture inlining only then --- protocols/JabberG/src/jabber_ft.cpp | 17 +++++++++-------- 1 file 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++) -- cgit v1.2.3