Add 'leave group' functionality. Includes other bug fixes.

This commit is contained in:
Moxie Marlinspike
2014-02-22 10:54:43 -08:00
parent a6e1d56cde
commit 9c9866e7ee
11 changed files with 159 additions and 55 deletions

View File

@@ -24,12 +24,14 @@ public class OutgoingGroupMediaMessage extends OutgoingSecureMediaMessage {
this.group = group;
PduPart part = new PduPart();
part.setData(avatar);
part.setContentType(ContentType.IMAGE_PNG.getBytes());
part.setContentId((System.currentTimeMillis()+"").getBytes());
part.setName(("Image" + System.currentTimeMillis()).getBytes());
body.addPart(part);
if (avatar != null) {
PduPart part = new PduPart();
part.setData(avatar);
part.setContentType(ContentType.IMAGE_PNG.getBytes());
part.setContentId((System.currentTimeMillis()+"").getBytes());
part.setName(("Image" + System.currentTimeMillis()).getBytes());
body.addPart(part);
}
}
@Override