-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I will just lead with some example code (it's kotlin, hope its okay, but the gist should be clear)
fun main() {
val client = StreamSDKClient()
val updateUsersRequest = UpdateUsersRequest().apply {
users = mapOf("test" to UserRequest().apply {
id = "tester"
name = "Tester"
})
}
client.updateUsers(
updateUsersRequest
).execute().data.users.forEach {
println(it)
}
}
The output looks like this:
tester=FullUserResponse(banned=false, createdAt=Thu May 22 23:25:49 CEST 55808194, id=tester, invisible=false, language=, online=false, role=user, shadowBanned=false, totalUnreadCount=0, unreadChannels=0, unreadCount=0, unreadThreads=0, updatedAt=Thu May 22 23:25:49 CEST 55808194, blockedUserIds=[], channelMutes=[], devices=[], mutes=[], teams=[], custom={}, avgResponseTime=null, banExpires=null, deactivatedAt=null, deletedAt=null, image=null, lastActive=null, name=Tester, revokeTokensIssuedBefore=null, latestHiddenChannels=null, privacySettings=null, teamsRole=null)
As you see, the date is completely off: createdAt=Thu May 22 23:25:49 CEST 55808194 which is (roughly, maybe due to precission issues) the value if you multiply the current timestamp with 1e6.
The reasons seems to be that the V2 api responds with timestamps in microseconds resulution (e.g. 1761074344387549000), but the objectMapper the SDK is using to deserialize the response is not configured to understand these timestamps.
It's not a grave issue for us since we are not using this timestamp. I just noticed and thought I should share.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels