mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 21:29:54 +01:00
rebased with master
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package org.briarproject.messaging;
|
||||
|
||||
import org.briarproject.api.clients.ClientHelper;
|
||||
import org.briarproject.api.contact.ContactManager;
|
||||
import org.briarproject.api.data.BdfReaderFactory;
|
||||
import org.briarproject.api.data.BdfWriterFactory;
|
||||
@@ -25,19 +26,18 @@ public class MessagingModule {
|
||||
|
||||
@Provides
|
||||
PrivateMessageFactory providePrivateMessageFactory(
|
||||
MessageFactory messageFactory,
|
||||
BdfWriterFactory bdfWriterFactory) {
|
||||
return new PrivateMessageFactoryImpl(messageFactory, bdfWriterFactory);
|
||||
ClientHelper clientHelper) {
|
||||
return new PrivateMessageFactoryImpl(clientHelper);
|
||||
}
|
||||
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
PrivateMessageValidator getValidator(ValidationManager validationManager,
|
||||
BdfReaderFactory bdfReaderFactory, MetadataEncoder metadataEncoder,
|
||||
ClientHelper clientHelper, MetadataEncoder metadataEncoder,
|
||||
Clock clock) {
|
||||
PrivateMessageValidator validator = new PrivateMessageValidator(
|
||||
bdfReaderFactory, metadataEncoder, clock);
|
||||
clientHelper, metadataEncoder, clock);
|
||||
validationManager.registerMessageValidator(CLIENT_ID, validator);
|
||||
return validator;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.briarproject.clients.BdfMessageValidator;
|
||||
import static org.briarproject.api.messaging.MessagingConstants.MAX_CONTENT_TYPE_LENGTH;
|
||||
import static org.briarproject.api.messaging.MessagingConstants.MAX_PRIVATE_MESSAGE_BODY_LENGTH;
|
||||
|
||||
class PrivateMessageValidator extends BdfMessageValidator {
|
||||
public class PrivateMessageValidator extends BdfMessageValidator {
|
||||
|
||||
PrivateMessageValidator(ClientHelper clientHelper,
|
||||
MetadataEncoder metadataEncoder, Clock clock) {
|
||||
|
||||
Reference in New Issue
Block a user