Skip to content

Commit 6ed4ea0

Browse files
authored
feat: point to Zulip chat rather than jabber. (ietf-tools#4218)
* feat: point to Zulip chat rather than jabber. * fix: Address review comments from Jennifer and Nick
1 parent 470adb9 commit 6ed4ea0

16 files changed

Lines changed: 150 additions & 83 deletions

File tree

client/agenda/AgendaScheduleList.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,12 @@ const meetingEvents = computed(() => {
278278
}
279279
if (item.adjustedEnd > current) {
280280
// -> Pre/live event
281-
// -> Jabber logs
281+
// -> Chat room
282282
links.push({
283-
id: `lnk-${item.id}-logs`,
284-
label: `Chat logs for ${item.acronym}`,
283+
id: `lnk-${item.id}-room`,
284+
label: `Chat room for ${item.acronym}`,
285285
icon: 'chat-left-text',
286-
href: `xmpp:${item.type === 'plenary' ? 'plenary' : item.acronym}@jabber.ietf.org?join`,
286+
href: item.links.chat,
287287
color: 'green'
288288
})
289289
// -> Video stream
@@ -339,12 +339,12 @@ const meetingEvents = computed(() => {
339339
} else {
340340
// -> Post event
341341
if (meetingNumberInt >= 60) {
342-
// -> Jabber logs
342+
// -> Chat logs
343343
links.push({
344344
id: `lnk-${item.id}-logs`,
345345
label: `Chat logs for ${item.acronym}`,
346346
icon: 'chat-left-text',
347-
href: `https://www.ietf.org/jabber/logs/${item.type === 'plenary' ? 'plenary' : item.acronym}?C=M;O=D`,
347+
href: item.links.chatArchive,
348348
color: 'green'
349349
})
350350
}

client/agenda/store.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,11 @@ export const useAgendaStore = defineStore('agenda', {
107107
adjustedStartDateTime: eventStartDate.toISO(),
108108
adjustedEndDateTime: eventEndDate.toISO(),
109109
links: {
110-
recordings: s.links.recordings,
110+
...s.links,
111111
videoStream: formatLinkUrl(s.links.videoStream, s, state.meeting.number),
112112
onsiteTool: formatLinkUrl(s.links.onsiteTool, s, state.meeting.number),
113113
audioStream: formatLinkUrl(s.links.audioStream, s, state.meeting.number),
114-
remoteCallIn: remoteCallInUrl,
115-
calendar: s.links.calendar
114+
remoteCallIn: remoteCallInUrl
116115
},
117116
sessionKeyword: s.sessionToken ? `${s.groupAcronym}-${s.sessionToken}` : s.groupAcronym
118117
}

ietf/doc/templatetags/ietf_filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ def is_special_agenda_item(assignment):
729729

730730
@register.filter
731731
def should_show_agenda_session_buttons(assignment):
732-
"""Should this agenda item show the session buttons (jabber link, etc)?
732+
"""Should this agenda item show the session buttons (chat link, etc)?
733733
734734
In IETF-112 and earlier, office hours sessions were designated by a name ending
735735
with ' office hours' and belonged to the IESG or some other group. This led to

ietf/group/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ class GroupFeaturesAdmin(admin.ModelAdmin):
200200
'has_nonsession_materials',
201201
'has_meetings',
202202
'has_reviews',
203-
'has_default_jabber',
203+
'has_default_chat',
204204
'acts_like_wg',
205205
'create_wiki',
206206
'custom_group_roles',
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright The IETF Trust 2022, All Rights Reserved
2+
# Generated by Django 2.2.28 on 2022-07-14 09:09
3+
4+
from django.db import migrations
5+
6+
7+
class Migration(migrations.Migration):
8+
9+
dependencies = [
10+
('group', '0056_dir_chair_groupman_role'),
11+
]
12+
13+
operations = [
14+
migrations.RenameField(
15+
model_name='groupfeatures',
16+
old_name='has_default_jabber',
17+
new_name='has_default_chat',
18+
),
19+
]

ietf/group/models.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,16 @@ def get_description(self):
205205
desc = [ p for p in re.split(r'\r?\n\s*\r?\n\s*', text) if p.strip() ][0]
206206
return desc
207207

208+
def chat_room_url(self):
209+
return settings.CHAT_URL_PATTERN.format(chat_room_name=self.acronym)
210+
211+
def chat_archive_url(self):
212+
# Zulip has no separate archive
213+
if 'CHAT_ARCHIVE_URL_PATTERN' in settings:
214+
return settings.CHAT_ARCHIVE_URL_PATTERN.format(chat_room_name=self.acronym)
215+
else:
216+
return self.chat_room_url()
217+
208218

209219
validate_comma_separated_materials = RegexValidator(
210220
regex=r"[a-z0-9_-]+(,[a-z0-9_-]+)*",
@@ -237,7 +247,7 @@ class GroupFeatures(models.Model):
237247
has_nonsession_materials= models.BooleanField("Other Matrl.", default=False)
238248
has_meetings = models.BooleanField("Meetings", default=False)
239249
has_reviews = models.BooleanField("Reviews", default=False)
240-
has_default_jabber = models.BooleanField("Jabber", default=False)
250+
has_default_chat = models.BooleanField("Chat", default=False)
241251
#
242252
acts_like_wg = models.BooleanField("WG-Like", default=False)
243253
create_wiki = models.BooleanField("Wiki", default=False)

ietf/group/resources.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ class Meta:
302302
"has_nonsession_materials": ALL,
303303
"has_meetings": ALL,
304304
"has_reviews": ALL,
305-
"has_default_jabber": ALL,
305+
"has_default_chat": ALL,
306306
"customize_workflow": ALL,
307307
"about_page": ALL,
308308
"default_tab": ALL,

ietf/meeting/models.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,14 +1254,24 @@ def agenda_file(self):
12541254

12551255
return self._agenda_file
12561256

1257-
def jabber_room_name(self):
1257+
def chat_room_name(self):
12581258
if self.type_id=='plenary':
12591259
return 'plenary'
1260-
elif self.historic_group:
1260+
elif hasattr(self, 'historic_group'):
12611261
return self.historic_group.acronym
12621262
else:
12631263
return self.group.acronym
12641264

1265+
def chat_room_url(self):
1266+
return settings.CHAT_URL_PATTERN.format(chat_room_name=self.chat_room_name())
1267+
1268+
def chat_archive_url(self):
1269+
# Zulip has no separate archive
1270+
if hasattr(settings,'CHAT_ARCHIVE_URL_PATTERN'):
1271+
return settings.CHAT_ARCHIVE_URL_PATTERN.format(chat_room_name=self.chat_room_name())
1272+
else:
1273+
return self.chat_room_url()
1274+
12651275
def notes_id(self):
12661276
note_id_fragment = 'plenary' if self.type.slug == 'plenary' else self.group.acronym
12671277
return f'notes-ietf-{self.meeting.number}-{note_id_fragment}'

ietf/meeting/views.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,7 +1639,7 @@ def agenda_neue(request, num=None, name=None, base=None, ext=None, owner=None, u
16391639
"categories": filter_organizer.get_filter_categories(),
16401640
"isCurrentMeeting": is_current_meeting,
16411641
"useHedgeDoc": True if meeting.date>=settings.MEETING_USES_CODIMD_DATE else False,
1642-
"schedule": list(map(agenda_extract_shedule, filtered_assignments)),
1642+
"schedule": list(map(agenda_extract_schedule, filtered_assignments)),
16431643
"floors": list(map(agenda_extract_floorplan, floors))
16441644
},
16451645
"schedule": {
@@ -1651,7 +1651,7 @@ def agenda_neue(request, num=None, name=None, base=None, ext=None, owner=None, u
16511651

16521652
return rendered_page
16531653

1654-
def agenda_extract_shedule (item):
1654+
def agenda_extract_schedule (item):
16551655
return {
16561656
"id": item.id,
16571657
"room": item.room_name,
@@ -1689,7 +1689,8 @@ def agenda_extract_shedule (item):
16891689
"short": item.session.short if item.session.short else item.session.short_name,
16901690
"sessionToken": item.session.docname_token_only_for_multiple(),
16911691
"links": {
1692-
# "jabber": item.session.jabber_room_name
1692+
"chat" : item.session.chat_room_url(),
1693+
"chatArchive" : item.session.chat_archive_url(),
16931694
"recordings": list(map(agenda_extract_recording, item.session.recordings())),
16941695
"videoStream": item.timeslot.location.video_stream_url() if item.timeslot.location else "",
16951696
"audioStream": item.timeslot.location.audio_stream_url() if item.timeslot.location else "",

0 commit comments

Comments
 (0)