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.
|
|
|
|
::
|
|
|
|
/- spider, hark
|
|
|
|
/+ *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-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-07-20 16:21:03 +03:00
|
|
|
%garden %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-07-20 16:21:03 +03:00
|
|
|
%garden %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-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)
|
|
|
|
?. gud ~|(msg !!)
|
|
|
|
(pure:m !>(msg))
|