Search code examples
androidkotlingetstream-io

GetStream.io get reaction's extra returns null


I just add a like with this piece of code:

    val client = CloudClient.builder(API_KEY, token, user).build()
    val like = Reaction.Builder().kind("like").activityID(activityID).userID(user).extraField("extraUserID", userID).build()
    return client.reactions().add(user, like).get()

When I want to get it via:

fun createJsonWithReaction(r: Reaction): String {
    val rid = r.id
    val activityID = r.activityID
    val kind = r.kind
    val userID = r.userID
    val extraUserID = r.extra["extraUserID"]
    val text = r.extra["text"]
    return "{\"id\":\"$rid\", \"activityID\":\"$activityID\", \"kind\":\"$kind\", \"userID\":\"$userID\", \"extraUserID\":\"$extraUserID\", \"text\":\"$text\"}"
}

r.extra["extraUserID"] will be null and r.extra["text"] will be null

What is the probleme here?

SOLUTION

lol it looks like

extra

will be

activityData

naming conventions error o the API? Why I need to set with extraField and get via activityData? WTF?


Solution

  • SOLUTION

    lol it looks like

    extra
    

    will be

    activityData
    

    naming conventions probleme in the library itself