From 9de48904e749acbe412856579ea4463365f2fd78 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 22 Mar 2020 14:34:49 +0300 Subject: Jabber: picture inlining should precede file transfers because of reduced file types subset if you don't need inlining, disable it. --- protocols/JabberG/src/jabber_ft.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'protocols') diff --git a/protocols/JabberG/src/jabber_ft.cpp b/protocols/JabberG/src/jabber_ft.cpp index ecd8642c76..cea0891736 100644 --- a/protocols/JabberG/src/jabber_ft.cpp +++ b/protocols/JabberG/src/jabber_ft.cpp @@ -99,6 +99,14 @@ 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")); @@ -131,14 +139,6 @@ 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]; -- cgit v1.2.3