Skip to content

Commit 1654f93

Browse files
committed
Reworked the support for remote access urls in the agenda_note and remote_instructions fields of Session objects so as to accept any of a list of conference service domains as remote call-in URLs -- not only webex.
- Legacy-Id: 18119
1 parent 129d62e commit 1654f93

6 files changed

Lines changed: 29 additions & 13 deletions

File tree

ietf/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,6 +1122,7 @@ def skip_unreadable_post(record):
11221122

11231123
STATS_NAMES_LIMIT = 25
11241124

1125+
UTILS_MEETING_CONFERENCE_DOMAINS = ['webex.com', 'zoom.us', 'jitsi.org', 'meetecho.com', ]
11251126
UTILS_TEST_RANDOM_STATE_FILE = '.factoryboy_random_state'
11261127
UTILS_APIKEY_GUI_LOGIN_LIMIT_DAYS = 30
11271128

ietf/templates/meeting/agenda.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ <h2>
324324
<span class="label label-danger pull-right">CANCELLED</span>
325325
{% endif %}
326326

327-
{% if item.session.agenda_note|first_url %}
327+
{% if item.session.agenda_note|first_url|conference_url %}
328328
<br><a href={{item.session.agenda_note|first_url}}>{{item.session.agenda_note|slice:":23"}}</a>
329329
{% elif item.session.agenda_note %}
330330
<br><span class="text-danger">{{item.session.agenda_note}}</span>

ietf/templates/meeting/interim_session_buttons.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
{% if now < item.timeslot.end_time %}
3333
<!-- Jabber -->
3434
<a class="" href="xmpp:{{session.jabber_room_name}}@jabber.ietf.org?join" title="Jabber room for {{session.jabber_room_name}}"><span class="fa fa-fw fa-lightbulb-o"></span></a>
35-
<!-- webex -->
36-
{% if "webex.com/" in session.agenda_note|first_url %}
35+
<!-- Remote call-in -->
36+
{% if session.agenda_note|first_url|conference_url %}
3737
<a class=""
3838
href="{{ session.agenda_note|first_url }}"
39-
title="Webex session"><span class="fa fa-fw fa-phone"></span>
39+
title="Session call-in"><span class="fa fa-fw fa-phone"></span>
4040
</a>
41-
{% elif session.remote_instructions|first_url %}
41+
{% elif session.remote_instructions|first_url|conference_url %}
4242
<a class=""
4343
href="{{ session.remote_instructions|first_url }}"
4444
title="Session call-in"><span class="fa fa-fw fa-phone"></span>
@@ -57,7 +57,7 @@
5757
{% else %}
5858
<span class="">
5959
<span class="fa fa-fw fa-phone" style="color: #ddd;"
60-
title="No webex or meetecho info found in remote instructions or agenda note"></span>
60+
title="No remote call-in info found in remote instructions or agenda note"></span>
6161
</span>
6262
{% endif %}
6363
{% else %}

ietf/templates/meeting/session_buttons_include.html

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,16 @@
5050
title="Audio stream"><span class="glyphicon glyphicon-headphones"></span>
5151
</a>
5252
{% endif %}
53-
<!-- WebEx -->
54-
{% if "webex.com/" in session.agenda_note|first_url %}
53+
<!-- Remote call-in -->
54+
{% if session.agenda_note|first_url|conference_url %}
5555
<a class=""
5656
href="{{ session.agenda_note|first_url }}"
57-
title="Webex session"><span class="fa fa-fw fa-phone"></span>
57+
title="Session call-in"><span class="fa fa-fw fa-phone"></span>
58+
</a>
59+
{% elif session.remote_instructions|first_url|conference_url %}
60+
<a class=""
61+
href="{{ session.remote_instructions|first_url }}"
62+
title="Session call-in"><span class="fa fa-fw fa-phone"></span>
5863
</a>
5964
{% elif item.timeslot.location.webex_url %}
6065
<a class=""

ietf/templates/meeting/session_details_panel.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ <h2 class="anchor-target" id="session_{{session.pk}}">{% if sessions|length > 1
4040
{% if meeting.type.slug == 'interim' and session.remote_instructions %}
4141
<div>
4242
<b>Remote instructions:</b>
43-
{% if "https://ietf.webex.com" in session.agenda_note|first_url %}
43+
{% if session.agenda_note|first_url|conference_url %}
4444
<a class=""
4545
href="{{ session.agenda_note|first_url }}"
46-
title="Webex session"><span class="fa fa-fw fa-phone"></span>
46+
title="Session call-in"><span class="fa fa-fw fa-phone"></span>
4747
</a>
48-
{% elif "https://ietf.webex.com" in session.remote_instructions|first_url %}
48+
{% elif session.remote_instructions|first_url|conference_url %}
4949
<a class=""
5050
href="{{ session.remote_instructions|first_url }}"
51-
title="Webex session"><span class="fa fa-fw fa-phone"></span>
51+
title="Session call-in"><span class="fa fa-fw fa-phone"></span>
5252
</a>
5353
{% endif %}
5454
{{ session.remote_instructions }}

ietf/utils/templatetags/textfilters.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import bleach
77

88
from django import template
9+
from django.conf import settings
910
from django.template.defaultfilters import stringfilter
1011
from django.utils.html import escape
1112
from django.utils.safestring import mark_safe
@@ -84,3 +85,12 @@ def first_url(value):
8485
urls = re.findall(r"http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+", value)
8586
url = urls[0] if urls else None
8687
return url
88+
89+
@register.filter
90+
@stringfilter
91+
def conference_url(value):
92+
conf_re = r"http[s]?://\S*(%s)/" % ('|'.join(settings.UTILS_MEETING_CONFERENCE_DOMAINS), )
93+
return value if re.match(conf_re, value) else None
94+
95+
96+

0 commit comments

Comments
 (0)