mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 20:02:15 +00:00
embedded bot: Use server settings for storage_size_limit.
This commit is contained in:
@@ -3,6 +3,7 @@ import json
|
|||||||
import os
|
import os
|
||||||
from typing import Any, Callable, Dict, Optional
|
from typing import Any, Callable, Dict, Optional
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
from django.utils.translation import ugettext as _
|
from django.utils.translation import ugettext as _
|
||||||
|
|
||||||
from zerver.lib.actions import (
|
from zerver.lib.actions import (
|
||||||
@@ -41,7 +42,7 @@ def get_bot_handler(service_name: str) -> Any:
|
|||||||
|
|
||||||
|
|
||||||
class StateHandler:
|
class StateHandler:
|
||||||
storage_size_limit: int = 10000000 # TODO: Store this in the server configuration model.
|
storage_size_limit: int = settings.USER_STATE_SIZE_LIMIT
|
||||||
|
|
||||||
def __init__(self, user_profile: UserProfile) -> None:
|
def __init__(self, user_profile: UserProfile) -> None:
|
||||||
self.user_profile = user_profile
|
self.user_profile = user_profile
|
||||||
|
|||||||
Reference in New Issue
Block a user