Skip to content

Commit

Permalink
Use the mailto address for attendees
Browse files Browse the repository at this point in the history
  • Loading branch information
tbartelmess committed May 14, 2020
1 parent dbe8e99 commit 47563a7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Sources/SwiftIcal/Component.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ public enum Calscale {
}

public typealias CalendarUserAddress = String

extension CalendarUserAddress {
var mailtoAddress: String {
return "mailto:\(self)"
}
}


public typealias CommonName = String

public enum CalendarUserType: Equatable {
Expand Down Expand Up @@ -226,7 +234,7 @@ public struct Attendee {

extension Attendee: LibicalPropertyConvertible {
func libicalProperty() -> LibicalProperty {
let property = icalproperty_new_attendee(self.address)
let property = icalproperty_new_attendee(self.address.mailtoAddress)
if type != .individual {
icalproperty_add_parameter(property, type.libicalProperty())
}
Expand Down

0 comments on commit 47563a7

Please sign in to comment.