~rockorager/go-jmap-devel

go-jmap: vacationresponse: fix infinite recursion v1 PROPOSED

Robin Jarry: 1
 vacationresponse: fix infinite recursion

 1 files changed, 2 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~rockorager/go-jmap-devel/patches/45915/mbox | git am -3
Learn more about email & git

[PATCH go-jmap] vacationresponse: fix infinite recursion Export this patch

Fix infinite recursion when marshaling a VacationResponse object to
JSON. This type alias was forgotten.

Fixes: 821d0924a12e ("dates: force UTC timezone")
Signed-off-by: Robin Jarry <robin@jarry.cc>
---
 mail/vacationresponse/vacationresponse.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mail/vacationresponse/vacationresponse.go b/mail/vacationresponse/vacationresponse.go
index 9be17a2024c2..2967218ce8fe 100644
--- a/mail/vacationresponse/vacationresponse.go
+++ b/mail/vacationresponse/vacationresponse.go
@@ -60,5 +60,6 @@ func (v *VacationResponse) MarshalJson() ([]byte, error) {
		utc := v.ToDate.UTC()
		v.ToDate = &utc
	}
	return json.Marshal(v)
	type Alias VacationResponse
	return json.Marshal((*Alias)(v))
}
-- 
2.41.0