Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Fix List-Unsubscribe merge vars #318

Closed
wants to merge 8 commits into from
Closed

Conversation

kenyonj
Copy link
Contributor

@kenyonj kenyonj commented May 31, 2016

This makes sure that the merge vars are set for mandrill to fill in when
sending the email.

closes: #251

@tjmw tjmw temporarily deployed to constable-api-staging-pr-318 May 31, 2016 17:14 Inactive
@tjmw tjmw temporarily deployed to constable-api-staging-pr-318 May 31, 2016 17:16 Inactive
vars: [
%{
name: "subscription_id",
content: subscription_for(announcement, user).token
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts on token_for? if subscription_for isn't used anywhere else?

@BlakeWilliams
Copy link
Contributor

LGTM

@@ -5,6 +5,25 @@ defmodule Constable.TestWithEcto do
quote do
import Constable.Factory
alias Constable.Repo

defp merge_vars_for(user, announcement) do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functions generally should not be written directly inside quotes because it makes stack traces super messed up since it's copying this function in the context of every module that uses it. Instead it would probably be good to extract a module that you alias or import here like alias EmailHelper or something. And since this isn't used in that many context I would probably not alias or import it in TestWithEcto and instead alias or import it in the test that uses it

@paulcsmith
Copy link
Contributor

I thought the issue was that the token wasn't being interpolated in the header. If that's the case, does this fix that?

@tjmw tjmw temporarily deployed to constable-api-staging-pr-318 May 31, 2016 17:24 Inactive
@tjmw tjmw temporarily deployed to constable-api-staging-pr-318 May 31, 2016 17:30 Inactive
@tjmw tjmw temporarily deployed to constable-api-staging-pr-318 May 31, 2016 17:49 Inactive
@kenyonj kenyonj force-pushed the jk-fix-unsubscribe-header branch from 762e06d to 6e65db0 Compare May 31, 2016 18:16
@tjmw tjmw temporarily deployed to constable-api-staging-pr-318 May 31, 2016 18:16 Inactive
@kenyonj kenyonj temporarily deployed to constable-api-staging-pr-318 June 1, 2016 19:24 Inactive
@kenyonj kenyonj had a problem deploying to constable-api-staging-pr-318 June 1, 2016 20:26 Failure
@gfontenot
Copy link
Contributor

I think this is going to be subsumed by #339

@paulcsmith
Copy link
Contributor

@kenyonj I think you said that this is not possible after all so I'm going to close this. If I'm mistaken please reopen!

@paulcsmith paulcsmith closed this Jul 1, 2016
@paulcsmith paulcsmith deleted the jk-fix-unsubscribe-header branch February 24, 2017 22:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom List-Unsubscribe urls don't work currently with Mandrill
5 participants