mirror of
https://github.com/tloncorp/landscape.git
synced 2024-11-24 01:37:01 +03:00
bark: clear bark data on-opt-out
We shouldn't leave stale data in the mailchimp database, but rather wipe any data we've collected for users that are explicitly opting out.
This commit is contained in:
parent
7bd7e4f54b
commit
245503f5e7
@ -76,7 +76,13 @@
|
||||
%bark-remove-recipient
|
||||
=+ !<(=ship vase)
|
||||
?> =(src.bowl ship)
|
||||
`this(recipients (~(del in recipients) ship))
|
||||
:_ this(recipients (~(del in recipients) ship))
|
||||
:_ ~
|
||||
:* %pass /save-summary/(scot %p src.bowl)/(scot %da now.bowl)
|
||||
%arvo %k %fard
|
||||
%landscape %save-summary %noun
|
||||
!>(`[tlon.api mailchimp.api src.bowl %wipe ~])
|
||||
==
|
||||
::
|
||||
%bark-generate-summaries
|
||||
?> =(src.bowl our.bowl)
|
||||
@ -107,7 +113,7 @@
|
||||
== ==
|
||||
vase
|
||||
?~ result
|
||||
`this(recipients (~(del in recipients) src.bowl))
|
||||
$(mark %bark-remove-recipient, vase !>(src.bowl))
|
||||
::TODO maybe drop the result (or re-request) if the timestamp is too old?
|
||||
:_ this
|
||||
:~ :* %pass /save-summary/(scot %p src.bowl)/(scot %da requested.u.result)
|
||||
|
@ -18,6 +18,7 @@
|
||||
::
|
||||
$= summary
|
||||
$% [%life [sen=@ud rec=@ud gro=@t] [dms=@ud etc=@ud group=@t chat=@t]]
|
||||
[%wipe ~]
|
||||
==
|
||||
==
|
||||
=/ args !<([~ arg-mold] arg)
|
||||
@ -45,6 +46,9 @@
|
||||
=; vars=(map @t json)
|
||||
!>(`[mailchimp.args u.mail vars])
|
||||
%- ~(gas by *(map @t json))
|
||||
=? summary.args ?=(%wipe -.summary.args)
|
||||
[%life [0 0 ''] [0 0 '' '']]
|
||||
?> ?=(%life -.summary.args)
|
||||
=, summary.args
|
||||
:~ ['MSGS_SENT' (numb:enjs:format sen)]
|
||||
['MSGS_RECD' (numb:enjs:format rec)]
|
||||
|
Loading…
Reference in New Issue
Block a user