@@ -3159,16 +3159,16 @@ public Map<String,Object> getAttachmentsDictForSequenceWithContent(long sequence
31593159 }
31603160
31613161 String encodingStr = null ;
3162- if (encoding != AttachmentInternal .AttachmentEncoding .AttachmentEncodingNone ) {
3162+ if (encoding == AttachmentInternal .AttachmentEncoding .AttachmentEncodingGZIP ) {
31633163 // NOTE: iOS decode if attachment is included int the dict.
31643164 encodingStr = "gzip" ;
31653165 }
31663166
31673167 Map <String , Object > attachment = new HashMap <String , Object >();
3168- if (!(dataBase64 != null || dataSuppressed )) {
3168+ if (!(dataBase64 != null || dataSuppressed )) {
31693169 attachment .put ("stub" , true );
31703170 }
3171- if (dataBase64 != null ) {
3171+ if (dataBase64 != null ) {
31723172 attachment .put ("data" , dataBase64 );
31733173 }
31743174 if (dataSuppressed == true ) {
@@ -3177,11 +3177,13 @@ public Map<String,Object> getAttachmentsDictForSequenceWithContent(long sequence
31773177 attachment .put ("digest" , digestString );
31783178 String contentType = cursor .getString (2 );
31793179 attachment .put ("content_type" , contentType );
3180- if (encodingStr != null )
3180+ if (encodingStr != null ) {
31813181 attachment .put ("encoding" , encodingStr );
3182+ }
31823183 attachment .put ("length" , length );
3183- if (encodingStr != null && encodedLength >= 0 )
3184+ if (encodingStr != null && encodedLength >= 0 ) {
31843185 attachment .put ("encoded_length" , encodedLength );
3186+ }
31853187 attachment .put ("revpos" , cursor .getInt (6 ));
31863188
31873189 String filename = cursor .getString (0 );
0 commit comments