mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 13:19:52 +01:00
Remove redundant method.
This commit is contained in:
@@ -504,21 +504,6 @@ class MessagingManagerImpl implements MessagingManager, IncomingMessageHook,
|
|||||||
return new DeletionResult();
|
return new DeletionResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<AttachmentHeader> getAttachmentHeaders(Transaction txn,
|
|
||||||
MessageId m, GroupId g) throws DbException {
|
|
||||||
try {
|
|
||||||
BdfDictionary meta =
|
|
||||||
clientHelper.getMessageMetadataAsDictionary(txn, m);
|
|
||||||
Long messageType = meta.getOptionalLong(MSG_KEY_MSG_TYPE);
|
|
||||||
if (messageType != null && messageType != PRIVATE_MESSAGE)
|
|
||||||
throw new IllegalArgumentException();
|
|
||||||
return messageType == null ? emptyList() :
|
|
||||||
parseAttachmentHeaders(g, meta);
|
|
||||||
} catch (FormatException e) {
|
|
||||||
throw new DbException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteMessages(Transaction txn, GroupId g,
|
public void deleteMessages(Transaction txn, GroupId g,
|
||||||
Collection<MessageId> messageIds) throws DbException {
|
Collection<MessageId> messageIds) throws DbException {
|
||||||
@@ -535,7 +520,7 @@ class MessagingManagerImpl implements MessagingManager, IncomingMessageHook,
|
|||||||
clientHelper.getMessageMetadataAsDictionary(txn, m);
|
clientHelper.getMessageMetadataAsDictionary(txn, m);
|
||||||
Long messageType = meta.getOptionalLong(MSG_KEY_MSG_TYPE);
|
Long messageType = meta.getOptionalLong(MSG_KEY_MSG_TYPE);
|
||||||
if (messageType != null && messageType == PRIVATE_MESSAGE) {
|
if (messageType != null && messageType == PRIVATE_MESSAGE) {
|
||||||
for (AttachmentHeader h : getAttachmentHeaders(txn, m, g)) {
|
for (AttachmentHeader h : parseAttachmentHeaders(g, meta)) {
|
||||||
try {
|
try {
|
||||||
db.deleteMessage(txn, h.getMessageId());
|
db.deleteMessage(txn, h.getMessageId());
|
||||||
db.deleteMessageMetadata(txn, h.getMessageId());
|
db.deleteMessageMetadata(txn, h.getMessageId());
|
||||||
|
|||||||
Reference in New Issue
Block a user