Refactor group messaging protocol.

// FREEBIE
This commit is contained in:
Moxie Marlinspike
2014-02-21 17:51:25 -08:00
parent b855f8a163
commit a6e1d56cde
18 changed files with 314 additions and 254 deletions

View File

@@ -37,17 +37,11 @@ public class OutgoingGroupMediaMessage extends OutgoingSecureMediaMessage {
return true;
}
public boolean isGroupAdd() {
return
group.getType().getNumber() == GroupContext.Type.ADD_VALUE ||
group.getType().getNumber() == GroupContext.Type.CREATE_VALUE;
public boolean isGroupUpdate() {
return group.getType().getNumber() == GroupContext.Type.UPDATE_VALUE;
}
public boolean isGroupQuit() {
return group.getType().getNumber() == GroupContext.Type.QUIT_VALUE;
}
public boolean isGroupModify() {
return group.getType().getNumber() == GroupContext.Type.MODIFY_VALUE;
}
}