Skip to content

Commit

Permalink
Hotfix/7360 (#224)
Browse files Browse the repository at this point in the history
* fix unconpatible change

* update changelog

---------

Co-authored-by: wasnot <[email protected]>
  • Loading branch information
wasnot and wasnot authored Apr 6, 2023
1 parent 42b828f commit f5b4e1d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@

| モジュール/プラグイン名 | Description | 最新のバージョン |
| :-- | :-- | :-- |
| core | イベントトラッキング機能を提供します。 | 2.21.0 |
| core | イベントトラッキング機能を提供します。 | 2.21.1 |
| inappmessaging | アプリ内メッセージ機能を提供します。 | 2.15.0 |
| notifications | プッシュ通知の受信および効果測定機能を提供します。 | 2.9.1 |
| variables | 設定値配信機能を提供します。 | 2.4.0 |
| visualtracking | ビジュアルトラッキング機能を提供します。| 2.8.0 |
| inbox | Push通知の送信履歴を取得する機能を提供します(β版)。 | 0.1.0 |
| Karte Gradle Plugin | ビジュアルトラッキング機能に必要なプラグインです。| 2.5.0 |

# Releases - xxxx.xx.xx

### Core 2.21.1
** 💊FIXED **
- Eventクラスのコンストラクタに非互換な変更が含まれていたのを修正しました。

# Releases - 2023.04.04

### Core 2.21.0
Expand Down
1 change: 1 addition & 0 deletions core/src/main/java/io/karte/android/core/library/Module.kt
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ interface TrackModule : Module {
* またSDK初期化時に一度だけ呼ばれます。
*/
val eventRejectionFilterRules: List<TrackEventRejectionFilterRule>
get() = emptyList()

/**
* リクエスト処理に割り込みます。
Expand Down
16 changes: 11 additions & 5 deletions core/src/main/java/io/karte/android/tracking/Event.kt
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ open class Event {
this.libraryName = libraryName
}

constructor(eventName: EventName, jsonObject: JSONObject? = null, isRetryable: Boolean? = null) : this(eventName, jsonObject, isRetryable, null)

/** [Values] による初期化 */
constructor(eventName: EventName, values: Values? = null, isRetryable: Boolean? = null, libraryName: String? = null) : this(
eventName,
Expand All @@ -102,6 +104,8 @@ open class Event {
libraryName
)

constructor(eventName: EventName, values: Values? = null, isRetryable: Boolean? = null) : this(eventName, values, isRetryable, null)

internal fun toJSON(forSerialize: Boolean = false): JSONObject {
return JSONObject()
.put("event_name", eventName.value)
Expand Down Expand Up @@ -232,12 +236,14 @@ class MessageEvent(
values: Values? = null,
libraryName: String? = null
) : Event(CustomEventName(type.eventNameStr), valuesOf(values) {
val merged = merge(mapOf(
"message" to mapOf(
"campaign_id" to campaignId,
"shorten_id" to shortenId
val merged = merge(
mapOf(
"message" to mapOf(
"campaign_id" to campaignId,
"shorten_id" to shortenId
)
)
))
)
putAll(merged)
}, libraryName = libraryName)

Expand Down
2 changes: 1 addition & 1 deletion core/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.21.0
2.21.1

0 comments on commit f5b4e1d

Please sign in to comment.