Manos Chorianopoulos

fix addUserTag event v2

......@@ -45,11 +45,15 @@ import SwiftEventBus
} else if (eventArray[1] == "addUserTag") {
let questionnaireEvent = swiftApi.QuestionnaireEventModel()
questionnaireEvent._name = String(eventArray[1])
questionnaireEvent._parameter = String(eventArray[2])
if (eventArray.count > 2) {
questionnaireEvent._parameter = String(eventArray[2])
swiftApi().setUserTag(String(eventArray[2]))
} else {
questionnaireEvent._parameter = ""
swiftApi().setUserTag("")
}
SwiftEventBus.post("questionnaire", sender: questionnaireEvent)
swiftApi().setUserTag(String(eventArray[2]))
} else if (eventArray[1] == "couponRetrieved") {
let couponEvent = swiftApi.CouponEventModel()
SwiftEventBus.post("coupon_retrieved", sender: couponEvent)
......