@@ -178,7 +178,10 @@ export class TopBarComponent implements OnInit, OnDestroy {
178178 }
179179
180180 if ( event . actionId === 'connect' ) {
181- const target = raw . authorizationUrl ?. uri
181+ const integration = this . parseOrcidIntegrationIntro (
182+ raw ?. notificationIntro
183+ )
184+ const target = integration ?. link || raw . authorizationUrl ?. uri
182185 this . _inbox
183186 . flagAsRead ( raw . putCode )
184187 . pipe ( first ( ) )
@@ -212,7 +215,14 @@ export class TopBarComponent implements OnInit, OnDestroy {
212215 . subscribe ( ( grouped ) => {
213216 this . permissionPanelRaw = grouped
214217 this . permissionPanelNotifications = grouped . map ( ( n ) => {
215- const orgName = n ?. sourceDescription || ''
218+ const integration = this . parseOrcidIntegrationIntro (
219+ n ?. notificationIntro
220+ )
221+ const orgName =
222+ integration ?. memberName ||
223+ n ?. source ?. sourceName ?. content ||
224+ n ?. sourceDescription ||
225+ ''
216226 const escaped = orgName
217227 . replace ( / & / g, '&' )
218228 . replace ( / < / g, '<' )
@@ -242,6 +252,19 @@ export class TopBarComponent implements OnInit, OnDestroy {
242252 } )
243253 }
244254
255+ private parseOrcidIntegrationIntro (
256+ intro ?: string
257+ ) : { memberName : string ; link : string } | null {
258+ if ( ! intro || ! intro . includes ( '::' ) ) {
259+ return null
260+ }
261+ const [ memberName , link ] = intro . split ( '::' )
262+ if ( ! memberName || ! link ) {
263+ return null
264+ }
265+ return { memberName, link }
266+ }
267+
245268 resendVerificationEmailModal ( email : string ) {
246269 this . _verificationEmailModalService . openVerificationEmailModal ( email )
247270 }
0 commit comments