Skip to content

Commit

Permalink
EML: Fill event-link from resolved event (#3473)
Browse files Browse the repository at this point in the history
* EML: Fill event-link from resolved event

* Use Logic.emptyOr

Co-authored-by: Martin B <[email protected]>

---------

Co-authored-by: Martin B <[email protected]>
  • Loading branch information
mbergen and iMarbot authored Nov 3, 2023
1 parent 47134ef commit f0d1b59
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/external_media_links/external_media_link.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ function ExternalMediaLink._store(args)
translation = args.translation,
translator = args.translator,
event = args.event,
event_link = args['event-link'],
event_link = mw.ext.TeamLiquidIntegration.resolve_redirect(
Logic.emptyOr(args['event-link'], args.event, '')
),
subject_organization = args.subject_organization1, --legacy
}

Expand Down Expand Up @@ -245,7 +247,7 @@ function ExternalMediaLink.wrapper(args)
type = args.type and args.type:lower() or nil,
of = args.of,
event = args.event,
['event-link'] = args['event-link'] and mw.ext.TeamLiquidIntegration.resolve_redirect(args['event-link']) or nil,
['event-link'] = args['event-link'],
language = args.language,
translation = args.translation,
translator = args.translator,
Expand Down

0 comments on commit f0d1b59

Please sign in to comment.