Skip to content

Commit

Permalink
Disable default meeting file and send all files asynchronously to avo…
Browse files Browse the repository at this point in the history
…id long meeting creation delays
  • Loading branch information
LoanR committed Jul 23, 2024
1 parent 3125714 commit a7301ef
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
18 changes: 10 additions & 8 deletions web/b3desk/models/bbb.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,21 +189,23 @@ def create(self):

# default file is sent right away since it is need as the background
# image for the meeting
xml = (
self.meeting_file_addition_xml([self.meeting.default_file])
if self.meeting.default_file
else None
)
request = self.bbb_request("create", "POST", params=params, data=xml)
# xml = (
# self.meeting_file_addition_xml([self.meeting.default_file])
# if self.meeting.default_file
# else None
# )
# TODO: xml as data is not sent anymore at BBB meeting creation to avoid delay
request = self.bbb_request("create", "POST", params=params)
data = self.bbb_response(request)

# non default files are sent later
if (
self.meeting.non_default_files
self.meeting.files
and "returncode" in data
and data["returncode"] == "SUCCESS"
):
xml = self.meeting_file_addition_xml(self.meeting.non_default_files)
xml = self.meeting_file_addition_xml(self.meeting.files)
# TODO: send all files and not only the non default ones
request = self.bbb_request(
"insertDocument", params={"meetingID": self.meeting.meetingID}
)
Expand Down
6 changes: 3 additions & 3 deletions web/b3desk/templates/meeting/files.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ <h2 class="fr-h3">Vous pouvez ajouter un fichier :</h2>
<caption>Vos fichiers associés sont :</caption>
<thead>
<tr>
<th scope="col">Défaut</th>
<!-- <th scope="col">Défaut</th> -->
<th scope="col">Téléchargeable</th>
<th id="titleFileColumn" scope="col">Titre</th>
<th scope="col">Ajouté le</th>
Expand Down Expand Up @@ -176,7 +176,7 @@ <h1 id="delete-file-{{ file.id }}-title" class="fr-modal__title">
</dialog>

<tr id="{{ file.id }}" >
<td>
<!-- <td>
<div class="fr-toggle">
{% if file.is_default %}
<input disabled onclick=submitDefaultFile(event) checked type="checkbox" class="fr-toggle__input" id="isDefault-{{ file.id }}">
Expand All @@ -186,7 +186,7 @@ <h1 id="delete-file-{{ file.id }}-title" class="fr-modal__title">
<label class="fr-toggle__label" for="isDefault-{{ file.id }}" data-fr-checked-label="Oui" data-fr-unchecked-label="Non"></label>
{% endif %}
</div>
</td>
</td> -->
<td>
<div class="fr-toggle">
{% if file.is_downloadable %}
Expand Down

0 comments on commit a7301ef

Please sign in to comment.