caldav: don't generate comp tag if it's empty
Closes: https://github.com/emersion/go-webdav/issues/196
This commit is contained in:
parent
82bb8a7aea
commit
8888fdf9b0
@ -128,6 +128,10 @@ func (c *Client) FindCalendars(ctx context.Context, calendarHomeSet string) ([]C
|
|||||||
}
|
}
|
||||||
|
|
||||||
func encodeCalendarCompReq(c *CalendarCompRequest) (*comp, error) {
|
func encodeCalendarCompReq(c *CalendarCompRequest) (*comp, error) {
|
||||||
|
if c == nil || (c.Name == "" && !c.AllProps && !c.AllComps && len(c.Props) == 0 && len(c.Comps) == 0) {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
encoded := comp{Name: c.Name}
|
encoded := comp{Name: c.Name}
|
||||||
|
|
||||||
if c.AllProps {
|
if c.AllProps {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user