@@ -26,31 +26,14 @@ export const GET: APIRoute = async ({ params, request }) => {
2626 const message_template_full = ( {
2727 name,
2828 talkTitle,
29- affiliation ,
29+ talkUrl ,
3030 fallbackUrl,
3131 } : {
3232 name : string ;
3333 talkTitle : string ;
34- affiliation : string | null ;
34+ talkUrl : string ;
3535 fallbackUrl : string ;
36- } ) => `🚀 Exciting News: ${ name } to Speak at EuroPython 2025!
37-
38- I'm thrilled to announce that ${ name } ${ affiliation ? `, renowned for their work at ${ affiliation } ,` : "" } will be speaking at EuroPython 2025 about "${ talkTitle } "!
39-
40- 🗓️ Event: EuroPython 2025
41- 🔗 Details & Registration: https://ep2025.europython.eu/
42- 👤 Speaker Profile: ${ fallbackUrl }
43-
44- #EuroPython2025 #Python #TechConference` ;
45-
46- const message_template_short = ( {
47- name,
48- talkTitle,
49- } : {
50- name : string ;
51- talkTitle : string ;
52- } ) =>
53- `${ name } is speaking at EuroPython 2025 about "${ talkTitle } "! 🎤 https://ep2025.europython.eu/ #EuroPython2025` ;
36+ } ) => `Join ${ name } at EuroPython for “${ talkTitle } ”.` ;
5437
5538 const trimToLimit = ( text : string , limit : number ) =>
5639 text . length <= limit ? text : text . slice ( 0 , limit - 1 ) + "…" ;
@@ -66,7 +49,6 @@ I'm thrilled to announce that ${name}${affiliation ? `, renowned for their work
6649 bluesky_url,
6750 mastodon_url,
6851 submissions,
69- affiliation,
7052 } = speaker . data ;
7153
7254 const sessions = await Promise . all (
@@ -79,7 +61,9 @@ I'm thrilled to announce that ${name}${affiliation ? `, renowned for their work
7961 if ( validSessions . length === 0 ) continue ;
8062
8163 const talkTitle = validSessions [ 0 ] ?. data . title || "an exciting topic" ;
64+ const talkCode = validSessions [ 0 ] ?. data . code ;
8265
66+ const talkUrl = `https://ep2025.europython.eu/${ talkCode } ` ;
8367 const speakerImage = `https://ep2025-buffer.ep-preview.click/media/social-${ speaker . id } .png` ;
8468 const fallbackUrl = `https://ep2025.europython.eu/speaker/${ speaker . id } ` ;
8569 const links = {
@@ -94,15 +78,12 @@ I'm thrilled to announce that ${name}${affiliation ? `, renowned for their work
9478 const full = message_template_full ( {
9579 name,
9680 talkTitle,
97- affiliation ,
81+ talkUrl ,
9882 fallbackUrl : links [ platform ] ,
9983 } ) ;
100- const short = message_template_short ( { name, talkTitle } ) ;
10184 const limit = charLimits [ platform ] ;
10285
103- if ( full . length <= limit ) return full ;
104- if ( short . length <= limit ) return short ;
105- return trimToLimit ( short , limit ) ;
86+ return trimToLimit ( full , limit ) ;
10687 } ;
10788
10889 const record = {
0 commit comments