Skip to content

Commit

Permalink
fix: update signature of buildEvent method
Browse files Browse the repository at this point in the history
  • Loading branch information
wzieba committed Dec 13, 2023
1 parent a5811f5 commit 636a172
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ internal class EventsBuilder(
* @return A Map object representing the event to be sent to Parse.ly.
*/
fun buildEvent(
url: String?,
urlRef: String?,
url: String,
urlRef: String,
action: String,
metadata: ParselyMetadata?,
extraData: Map<String, Any>?,
uuid: String?
): Map<String, Any?> {
uuid: String
): Map<String, Any> {
log("buildEvent called for %s/%s", action, url)
val now = Calendar.getInstance(TimeZone.getTimeZone("UTC"))

// Main event info
val event: MutableMap<String, Any?> = HashMap()
val event: MutableMap<String, Any> = HashMap()
event["url"] = url
event["urlref"] = urlRef
event["idsite"] = siteId
Expand All @@ -44,8 +44,8 @@ internal class EventsBuilder(
data["ts"] = now.timeInMillis
data.putAll(deviceInfo)
event["data"] = data
if (metadata != null) {
event["metadata"] = metadata.toMap()
metadata?.let {
event["metadata"] = it.toMap()
}
if (action == "videostart" || action == "vheartbeat") {
event[VIDEO_START_ID_KEY] = uuid
Expand Down

0 comments on commit 636a172

Please sign in to comment.