main
Bob Mottram 2024-04-13 12:02:54 +01:00
parent dc484364e1
commit 8b0b378d3a
2 changed files with 9 additions and 6 deletions

View File

@ -392,7 +392,10 @@ def daemon_http_post(self) -> None:
self.server.domain_full, self.server.domain_full,
self.server.onion_domain, self.server.onion_domain,
self.server.i2p_domain, self.server.i2p_domain,
curr_session, proxy_type) curr_session, proxy_type,
self.server.person_cache,
self.server.max_shares_on_profile,
self.server.project_version)
self.server.postreq_busy = False self.server.postreq_busy = False
return return

View File

@ -111,7 +111,10 @@ def remove_share(self, calling_domain: str, cookie: str,
authorized: bool, path: str, authorized: bool, path: str,
base_dir: str, http_prefix: str, domain_full: str, base_dir: str, http_prefix: str, domain_full: str,
onion_domain: str, i2p_domain: str, onion_domain: str, i2p_domain: str,
curr_session, proxy_type: str) -> None: curr_session, proxy_type: str,
person_cache: {},
max_shares_on_profile: int,
project_version: str) -> None:
"""Removes a shared item """Removes a shared item
""" """
users_path = path.split('/rmshare')[0] users_path = path.split('/rmshare')[0]
@ -180,7 +183,6 @@ def remove_share(self, calling_domain: str, cookie: str,
onion_domain, onion_domain,
i2p_domain) + \ i2p_domain) + \
'/users/' + share_nickname '/users/' + share_nickname
person_cache = self.server.person_cache
actor_json = get_person_from_cache(base_dir, actor_json = get_person_from_cache(base_dir,
actor, person_cache) actor, person_cache)
if not actor_json: if not actor_json:
@ -190,8 +192,6 @@ def remove_share(self, calling_domain: str, cookie: str,
if os.path.isfile(actor_filename): if os.path.isfile(actor_filename):
actor_json = load_json(actor_filename, 1, 1) actor_json = load_json(actor_filename, 1, 1)
if actor_json: if actor_json:
max_shares_on_profile = \
self.server.max_shares_on_profile
if add_shares_to_actor(base_dir, if add_shares_to_actor(base_dir,
share_nickname, share_domain, share_nickname, share_domain,
actor_json, actor_json,
@ -212,7 +212,7 @@ def remove_share(self, calling_domain: str, cookie: str,
'after change to attached shares 2: ' + 'after change to attached shares 2: ' +
str(update_actor_json)) str(update_actor_json))
post_to_outbox(self, update_actor_json, post_to_outbox(self, update_actor_json,
self.server.project_version, project_version,
share_nickname, share_nickname,
curr_session, curr_session,
proxy_type) proxy_type)