mirror of
https://github.com/home-assistant/android
synced 2024-09-06 17:23:32 +00:00
Breaking Change: Only send notification received event if a notification wants the confirmation (#2899)
* Breaking Change: Only send notification received event if a notification wants the confirmation * Update change log
This commit is contained in:
parent
8713bb9678
commit
d87781dea4
|
@ -134,6 +134,7 @@ class MessagingManager @Inject constructor(
|
|||
const val COMMAND = "command"
|
||||
const val TTS_TEXT = "tts_text"
|
||||
const val CHANNEL = "channel"
|
||||
const val CONFIRMATION = "confirmation"
|
||||
|
||||
// special intent constants
|
||||
const val INTENT_PACKAGE_NAME = "intent_package_name"
|
||||
|
@ -280,13 +281,17 @@ class MessagingManager @Inject constructor(
|
|||
NotificationItem(0, now, jsonData[MESSAGE].toString(), jsonObject.toString(), source)
|
||||
notificationDao.add(notificationRow)
|
||||
|
||||
mainScope.launch {
|
||||
try {
|
||||
integrationUseCase.fireEvent("mobile_app_notification_received", jsonData)
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Unable to send notification received event", e)
|
||||
val confirmation = jsonData[CONFIRMATION]?.toBoolean() ?: false
|
||||
if (confirmation) {
|
||||
mainScope.launch {
|
||||
try {
|
||||
integrationUseCase.fireEvent("mobile_app_notification_received", jsonData)
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Unable to send notification received event", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
when {
|
||||
jsonData[MESSAGE] == REQUEST_LOCATION_UPDATE -> {
|
||||
Log.d(TAG, "Request location update")
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<release version="2022.9 - Phone" versioncode="2">
|
||||
<change><b>Breaking Change:</b> Geocoded Location sensor attributes for latitude and longitude have been combined into location, the sensor will no longer show on the map. Additional attributes also added to the sensor.</change>
|
||||
<change><b>Breaking Change:</b> Template widgets will only update when the template detects a change. If you are not seeing frequent updates then you are hit by rate limiting and will need to readjust the template.</change>
|
||||
<change><b>Breaking Change:</b> Notification Received event will only be sent if a notification contains "confirmation: true" in the service call.</change>
|
||||
<change>Add beacon monitor sensor</change>
|
||||
<change>Add authentication option to button widget</change>
|
||||
<change>Add option to bypass locking the app when on home WiFi</change>
|
||||
|
|
Loading…
Reference in a new issue