parent
							
								
									25ffaaaa2d
								
							
						
					
					
						commit
						c97227825f
					
				
					 1 changed files with 7 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -422,9 +422,9 @@ void FileLoadTask::process() {
 | 
			
		|||
 | 
			
		||||
	QVector<MTPDocumentAttribute> attributes(1, MTP_documentAttributeFilename(MTP_string(filename)));
 | 
			
		||||
 | 
			
		||||
	MTPPhotoSize thumbSize(MTP_photoSizeEmpty(MTP_string("")));
 | 
			
		||||
	MTPPhoto photo(MTP_photoEmpty(MTP_long(0)));
 | 
			
		||||
	MTPDocument document(MTP_documentEmpty(MTP_long(0)));
 | 
			
		||||
	auto thumbSize = MTP_photoSizeEmpty(MTP_string(""));
 | 
			
		||||
	auto photo = MTP_photoEmpty(MTP_long(0));
 | 
			
		||||
	auto document = MTP_documentEmpty(MTP_long(0));
 | 
			
		||||
 | 
			
		||||
	if (!isVoice) {
 | 
			
		||||
		if (!_information) {
 | 
			
		||||
| 
						 | 
				
			
			@ -540,6 +540,10 @@ void FileLoadTask::process() {
 | 
			
		|||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (_type == SendMediaType::Photo && photo.type() == mtpc_photoEmpty) {
 | 
			
		||||
		_type = SendMediaType::File;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (isVoice) {
 | 
			
		||||
		auto flags = MTPDdocumentAttributeAudio::Flag::f_voice | MTPDdocumentAttributeAudio::Flag::f_waveform;
 | 
			
		||||
		attributes[0] = MTP_documentAttributeAudio(MTP_flags(flags), MTP_int(_duration), MTPstring(), MTPstring(), MTP_bytes(documentWaveformEncode5bit(_waveform)));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue