2013-08-22 00:25:19 +00:00
|
|
|
package org.thoughtcrime.securesms.sms;
|
|
|
|
|
2015-03-11 21:23:45 +00:00
|
|
|
public class IncomingPreKeyBundleMessage extends IncomingTextMessage {
|
2013-08-22 00:25:19 +00:00
|
|
|
|
2016-11-09 17:37:40 +00:00
|
|
|
private final boolean legacy;
|
|
|
|
|
|
|
|
public IncomingPreKeyBundleMessage(IncomingTextMessage base, String newBody, boolean legacy) {
|
2013-08-22 00:25:19 +00:00
|
|
|
super(base, newBody);
|
2016-11-09 17:37:40 +00:00
|
|
|
this.legacy = legacy;
|
2013-08-22 00:25:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public IncomingPreKeyBundleMessage withMessageBody(String messageBody) {
|
2016-11-09 17:37:40 +00:00
|
|
|
return new IncomingPreKeyBundleMessage(this, messageBody, legacy);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean isLegacyPreKeyBundle() {
|
|
|
|
return legacy;
|
2013-08-22 00:25:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2016-11-09 17:37:40 +00:00
|
|
|
public boolean isContentPreKeyBundle() {
|
|
|
|
return !legacy;
|
2013-08-22 00:25:19 +00:00
|
|
|
}
|
2015-03-11 21:23:45 +00:00
|
|
|
|
2013-08-22 00:25:19 +00:00
|
|
|
}
|