Skip to content

Save/load message color #36

@sindresorhus

Description

@sindresorhus

The .sendColor property is useful for distinguishing different types of messages.
Currently I'm changing the .sendColor before sending a message depending on what kind of message it is.

The problem is that I want the conversation to be persistent, so i save and load the conversation, but the .sendColor is not persisted.

What I would like is the that the .getAllMessages() method returned and array like this:

[
    {
        index: 0,
        send: 'dsfdsf',
        sendColor: 'Purple',
        selectedColor: 'Blue'
    },
    {
        index: 1,
        recieve: 'dsfdsf',
        recieveColor: 'Gray',
        selectedColor: 'Blue'
    }
]

And the .loadMessages() would accept an array like this, and apply the colors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions