Skip to content

SDK discards non-string Custom Attributes values #43

@markwpearce

Description

@markwpearce

When the task is building the message to be sent, all non-string custom attributes are discarded. The mpPublicModels.Message() function will specifically ignore any attribute value that does not pass an mputils.isString() check:

See code here: https://github.com/mParticle/mparticle-roku-sdk/blob/master/mParticleCore.brs#L1379

                    mputils = mparticle()._internal.utils
                    attributeKeys = attributes.Keys()
                    validAttributes = {}
                    for each attributeKey in attributeKeys
                        if (mputils.isString(attributes[attributeKey])) then
                            validAttributes[attributeKey] = attributes[attributeKey]
                        end if
                    end for
                    attributes = validAttributes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions