better organisation of code
This commit is contained in:
parent
385bc808a7
commit
5451f0d4cc
1 changed files with 7 additions and 7 deletions
|
@ -227,11 +227,11 @@ class Calendar {
|
|||
_parse_vevent(vevent) {
|
||||
const event = {}
|
||||
vevent.forEach(elt => {
|
||||
if (elt[0] == "attendee" && elt[1].cn && elt[1].role == "CHAIR") {
|
||||
if (event[elt[0]] === undefined) event["speakers"] = []
|
||||
event["speakers"].push({
|
||||
cn: elt[1].cn,
|
||||
calAddress: elt[3]
|
||||
if (elt[0] === "attendee") {
|
||||
if (event[elt[0]] === undefined) event[elt[0]] = []
|
||||
event[elt[0]].push({
|
||||
props: elt[1],
|
||||
val: elt[3]
|
||||
});
|
||||
} else {
|
||||
event[elt[0]] = elt[3]
|
||||
|
@ -288,8 +288,8 @@ function fcEventFromjCalEvent(cal) {
|
|||
fcEvent.classNames = [`st-${evt.status.toLowerCase()}`]
|
||||
}
|
||||
|
||||
if (evt.speakers) {
|
||||
fcEvent.speakers = evt.speakers
|
||||
if (evt.attendee) {
|
||||
fcEvent.speakers = evt.attendee.filter(a => a.prop.cn && a.prop.role === "REQ-PARTICIPANT")
|
||||
}
|
||||
|
||||
if (evt.rrule) {
|
||||
|
|
Loading…
Reference in a new issue