diff --git a/web/b3desk/endpoints/meeting_files.py b/web/b3desk/endpoints/meeting_files.py
index 17aaa6d..8d87853 100644
--- a/web/b3desk/endpoints/meeting_files.py
+++ b/web/b3desk/endpoints/meeting_files.py
@@ -169,6 +169,9 @@ def insertDocuments(meeting: Meeting):
filehash = hashlib.sha1(
f"{secret_key}-1-{id}-{secret_key}".encode()
).hexdigest()
+ current_app.logger.info(
+ "Call insert document BigBlueButton API in running room for %s", filename
+ )
url = url_for(
"meeting_files.ncdownload",
isexternal=1,
@@ -552,6 +555,9 @@ def insertDoc(token):
)
xml = f" "
+ current_app.logger.info(
+ "Call insert document BigBlueButton API for %s", meeting_file.title
+ )
requests.post(
f"{current_app.config['BIGBLUEBUTTON_ENDPOINT']}/insertDocument",
data=xml,
@@ -565,6 +571,7 @@ def insertDoc(token):
@bp.route("/ncdownload///")
@bp.route("/ncdownload////")
def ncdownload(isexternal, mfid, mftoken, filename=None):
+ current_app.logger.info("Service requesting file url %s", filename)
secret_key = current_app.config["SECRET_KEY"]
# select good file from token
# get file through NC credentials - HOW POSSIBLE ?
diff --git a/web/b3desk/models/bbb.py b/web/b3desk/models/bbb.py
index 00ef4fc..de69c48 100644
--- a/web/b3desk/models/bbb.py
+++ b/web/b3desk/models/bbb.py
@@ -319,6 +319,10 @@ def meeting_file_addition_xml(self, meeting_files):
filehash = hashlib.sha1(
f"{current_app.config['SECRET_KEY']}-0-{meeting_file.id}-{current_app.config['SECRET_KEY']}".encode()
).hexdigest()
+ current_app.logger.info(
+ "Add document on BigBLueButton room creation for file",
+ meeting_file.title,
+ )
url = url_for(
"meeting_files.ncdownload",
isexternal=0,
diff --git a/web/b3desk/models/users.py b/web/b3desk/models/users.py
index 6c9d11b..611c49b 100644
--- a/web/b3desk/models/users.py
+++ b/web/b3desk/models/users.py
@@ -52,7 +52,7 @@ def get_user_nc_credentials(username):
or not current_app.config["FILE_SHARING"]
or not username
):
- current_app.logger.debug(
+ current_app.logger.info(
"File sharing deactivated or unable to perform, no connection to Nextcloud instance"
)
return {"nctoken": None, "nclocator": None, "nclogin": None}
@@ -87,10 +87,15 @@ def update_user_nc_credentials(user, user_info):
and user.nc_locator
and user.nc_token
and (
- (datetime.now() - user.nc_last_auto_enroll).days
+ (remaining_time := (datetime.now() - user.nc_last_auto_enroll)).days
<= current_app.config["NC_LOGIN_TIMEDELTA_DAYS"]
)
):
+ current_app.logger.info(
+ "Nextcloud login for user %s not to be refreshed for %s",
+ user,
+ remaining_time,
+ )
return False
preferred_username = (
@@ -104,8 +109,12 @@ def update_user_nc_credentials(user, user_info):
or data["nclocator"] is None
or data["nctoken"] is None
):
+ current_app.logger.info(
+ "No new Nextcloud enroll needed for user %s with those data %s", user, data
+ )
nc_last_auto_enroll = None
else:
+ current_app.logger.info("New Nextcloud enroll for user %s", data["nclogin"])
nc_last_auto_enroll = datetime.now()
user.nc_locator = data["nclocator"]