Now that we're transitioning to the v3 alerts interface in AO, we want to update notification links to use the new URL structure, including org ID. I thinkpayload['user_id'] always exists now (despite it only being present in the sample_new_alert_payload) and actually matches the org ID (thanks to org ghost owner magic). We don't want to mess with Librato alerts, so I put the change behind an ALERTS_V3_LINK env var (though I have no idea where in app-environs that actually needs to be set…).
This is a pretty naive first pass. I would greatly appreciate feedback and advice on next steps / how to actually get this out there, since I'm not at all familiar with how/where this code actually gets run.
TODO: add some tests once I know I'm on the right track
:ticket: https://swicloud.atlassian.net/browse/AO-12992
Now that we're transitioning to the v3 alerts interface in AO, we want to update notification links to use the new URL structure, including org ID. I think
payload['user_id']
always exists now (despite it only being present in thesample_new_alert_payload
) and actually matches the org ID (thanks to org ghost owner magic). We don't want to mess with Librato alerts, so I put the change behind anALERTS_V3_LINK
env var (though I have no idea where inapp-environs
that actually needs to be set…).This is a pretty naive first pass. I would greatly appreciate feedback and advice on next steps / how to actually get this out there, since I'm not at all familiar with how/where this code actually gets run.
TODO: add some tests once I know I'm on the right track