Skip to content

Commit 62ce65f

Browse files
chore: Ignore Websocket MessageCount
* Bring back MessageCount("message_count") response class * Listen in websocket frame but ignore ACK
1 parent 6a69d63 commit 62ce65f

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

lib/src/main/kotlin/com/wire/integrations/jvm/client/BackendClient.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,6 @@ interface BackendClient {
7373
): AssetUploadResponse
7474

7575
companion object {
76-
const val API_VERSION = "v8"
76+
const val API_VERSION = "v9"
7777
}
7878
}

lib/src/main/kotlin/com/wire/integrations/jvm/model/http/ConsumableNotificationResponse.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ sealed class ConsumableNotificationResponse {
3030
@SerialName("data") val data: EventDataDTO
3131
) : ConsumableNotificationResponse()
3232

33+
@Serializable
34+
@SerialName("message_count")
35+
data class MessageCount(
36+
@SerialName("data") val data: NotificationCount
37+
) : ConsumableNotificationResponse()
38+
3339
@Serializable
3440
@SerialName("notifications_missed")
3541
data object MissedNotification : ConsumableNotificationResponse()

lib/src/main/kotlin/com/wire/integrations/jvm/service/WireTeamEventsListener.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ internal class WireTeamEventsListener internal constructor(
8989
}
9090
}
9191

92+
is ConsumableNotificationResponse.MessageCount -> {
93+
logger.info("Websocket back online, ${notification.data.count} events to fetch")
94+
}
95+
9296
is ConsumableNotificationResponse.MissedNotification -> {
9397
logger.warn("App was offline for too long, missed some notifications")
9498
val ackRequest = EventAcknowledgeRequest.notificationMissedAck()

0 commit comments

Comments
 (0)