session-android/src/org/thoughtcrime/securesms/sms/IncomingPreKeyBundleMessage.java
2017-02-01 13:55:52 -08:00

28 lines
623 B
Java

package org.thoughtcrime.securesms.sms;
public class IncomingPreKeyBundleMessage extends IncomingTextMessage {
private final boolean legacy;
public IncomingPreKeyBundleMessage(IncomingTextMessage base, String newBody, boolean legacy) {
super(base, newBody);
this.legacy = legacy;
}
@Override
public IncomingPreKeyBundleMessage withMessageBody(String messageBody) {
return new IncomingPreKeyBundleMessage(this, messageBody, legacy);
}
@Override
public boolean isLegacyPreKeyBundle() {
return legacy;
}
@Override
public boolean isContentPreKeyBundle() {
return !legacy;
}
}