mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 19:59:05 +01:00
Limit the number of subscriptions per user.
This limit is necessary to limit the size of subscription update packets; it can be lifted when incremental subscription updates are implemented.
This commit is contained in:
@@ -297,8 +297,11 @@ public interface DatabaseComponent {
|
||||
void setVisibility(GroupId g, Collection<ContactId> visible)
|
||||
throws DbException;
|
||||
|
||||
/** Subscribes to the given group. */
|
||||
void subscribe(Group g) throws DbException;
|
||||
/**
|
||||
* Subscribes to the given group, or returns false if the user already has
|
||||
* the maximum number of subscriptions.
|
||||
*/
|
||||
boolean subscribe(Group g) throws DbException;
|
||||
|
||||
/**
|
||||
* Unsubscribes from the given group. Any messages belonging to the group
|
||||
|
||||
@@ -11,6 +11,9 @@ public interface MessagingConstants {
|
||||
*/
|
||||
int MAX_PACKET_LENGTH = MIN_CONNECTION_LENGTH / 2;
|
||||
|
||||
/** The maximum number of groups a user may subscribe to. */
|
||||
int MAX_SUBSCRIPTIONS = 3000;
|
||||
|
||||
/** The maximum number of properties per transport. */
|
||||
int MAX_PROPERTIES_PER_TRANSPORT = 100;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user