2023-07-14 19:04:23 +03:00
|
|
|
:: -save-summary: unpack growl summary, store in mailchimp merge fields
|
|
|
|
::
|
|
|
|
:: crashes on failure. on success, produces the result message from the
|
|
|
|
:: -mailchimp-update-merge-fields thread.
|
|
|
|
::
|
2023-07-28 21:34:41 +03:00
|
|
|
/- spider
|
2023-07-14 19:04:23 +03:00
|
|
|
/+ *strandio
|
|
|
|
=, strand=strand:spider
|
|
|
|
=, dejs:format
|
|
|
|
^- thread:spider
|
|
|
|
|= arg=vase
|
|
|
|
=/ m (strand ,vase)
|
|
|
|
^- form:m
|
|
|
|
=/ arg-mold
|
|
|
|
$: tlon-api-key=cord
|
2023-07-19 00:31:30 +03:00
|
|
|
mailchimp=[key=cord list-id=cord]
|
2023-07-14 19:04:23 +03:00
|
|
|
=ship
|
|
|
|
::
|
|
|
|
$= summary
|
2023-07-14 20:30:58 +03:00
|
|
|
$% [%life [sen=@ud rec=@ud gro=@t] [dms=@ud etc=@ud group=@t chat=@t]]
|
2023-10-05 11:24:31 +03:00
|
|
|
[%wipe ~]
|
2023-07-14 19:04:23 +03:00
|
|
|
==
|
|
|
|
==
|
|
|
|
=/ args !<([~ arg-mold] arg)
|
|
|
|
;< ~ bind:m
|
|
|
|
%- send-raw-card
|
|
|
|
:* %pass /check-email/(scot %p ship.args)
|
|
|
|
%arvo %k %fard
|
2023-08-15 01:27:34 +03:00
|
|
|
%landscape %hosting-email %noun
|
2023-07-14 19:04:23 +03:00
|
|
|
!>(`[(trip tlon-api-key.args) ship.args])
|
|
|
|
==
|
|
|
|
;< [mire=wire mine=sign-arvo] bind:m take-sign-arvo
|
|
|
|
?> ?=([%check-email @ *] mire)
|
|
|
|
?> =(i.t.mire (scot %p ship.args))
|
|
|
|
?> ?=([%khan %arow %.y %noun *] mine)
|
|
|
|
::
|
|
|
|
=/ [%khan %arow %.y %noun vs=vase] mine
|
|
|
|
=+ !<(mail=(unit cord) vs)
|
2023-07-28 22:19:46 +03:00
|
|
|
?~ mail
|
|
|
|
(pure:m !>('no-mail'))
|
2023-07-14 19:04:23 +03:00
|
|
|
;< ~ bind:m
|
|
|
|
%- send-raw-card
|
|
|
|
:* %pass /update-merge-fields/(scot %p ship.args)
|
|
|
|
%arvo %k %fard
|
2023-08-15 01:27:34 +03:00
|
|
|
%landscape %mailchimp-update-merge-fields %noun
|
2023-07-14 19:04:23 +03:00
|
|
|
=; vars=(map @t json)
|
2023-07-19 00:31:30 +03:00
|
|
|
!>(`[mailchimp.args u.mail vars])
|
2023-07-14 19:04:23 +03:00
|
|
|
%- ~(gas by *(map @t json))
|
2023-10-05 11:24:31 +03:00
|
|
|
=? summary.args ?=(%wipe -.summary.args)
|
|
|
|
[%life [0 0 ''] [0 0 '' '']]
|
|
|
|
?> ?=(%life -.summary.args)
|
2023-07-19 00:29:18 +03:00
|
|
|
=, summary.args
|
|
|
|
:~ ['MSGS_SENT' (numb:enjs:format sen)]
|
|
|
|
['MSGS_RECD' (numb:enjs:format rec)]
|
|
|
|
['GROUP_SENT' s+gro]
|
|
|
|
::
|
|
|
|
['UNREAD_DMS' (numb:enjs:format dms)]
|
|
|
|
['UNREAD_MSG' (numb:enjs:format etc)]
|
|
|
|
['GROUP_NAME' s+group]
|
|
|
|
['CHNL_NAME' s+chat]
|
2023-07-14 19:04:23 +03:00
|
|
|
==
|
|
|
|
==
|
|
|
|
;< [wimp=wire simp=sign-arvo] bind:m take-sign-arvo
|
|
|
|
?> ?=([%update-merge-fields @ *] wimp)
|
|
|
|
?> =(i.t.wimp (scot %p ship.args))
|
|
|
|
?> ?=([%khan %arow %.y %noun *] simp)
|
|
|
|
::
|
|
|
|
=/ [%khan %arow %.y %noun vs=vase] simp
|
|
|
|
=+ !<([gud=? msg=@t] vs)
|
2023-10-04 12:00:33 +03:00
|
|
|
?. gud ~|([ship=ship.args mail=u.mail msg] !!)
|
2023-07-14 19:04:23 +03:00
|
|
|
(pure:m !>(msg))
|