Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for post reactions #47

Closed
RiccardoM opened this issue Nov 20, 2019 · 0 comments · Fixed by #59
Closed

Support for post reactions #47

RiccardoM opened this issue Nov 20, 2019 · 0 comments · Fixed by #59
Assignees
Labels
kind/new-feature Propose the addition of a new feature that does not yet exist x/posts Post module
Projects
Milestone

Comments

@RiccardoM
Copy link
Contributor

Context

In the era of current social networks, more and more applications are allowing users to add more than simple likes to posts. As an example, we've seen Facebook reactions:

screenshot-www facebook com-2019 11

Another one is the ability on Slack to react with emojis:

Screenshot from 2019-11-20 11-33-16

I think we should support this feature too as it make Desmos even more attractive to applications developers.

Post reaction implementation proposal

Currently we represent the like object using the following data structure:

type Like struct {
    Created sdk.Int        `json:"created"` // Block height at which the like was created
    Owner   sdk.AccAddress `json:"owner"`
}

I propose to expand and rename this structure to support other reaction types as follows:

type Reaction struct {
    Created sdk.Int        `json:"created"`
    Owner   sdk.AccAddress `json:"owner"`
    Value   string         `json:"value"`
}

The only change is the new Value field which allows application to insert any kind of text inside the reaction. This might be a simple like string, or even emojis.

Storage changes

No storage changes should be required.

@RiccardoM RiccardoM added kind/new-feature Propose the addition of a new feature that does not yet exist status/specification This feature is currently in the specification process labels Nov 20, 2019
@RiccardoM RiccardoM added this to To do in Desmos via automation Nov 20, 2019
@RiccardoM RiccardoM changed the title Support for post reaction Support for post reactions Nov 20, 2019
@RiccardoM RiccardoM added this to the v0.2.0 milestone Dec 16, 2019
@RiccardoM RiccardoM added x/posts Post module Status:WIP and removed status/specification This feature is currently in the specification process labels Dec 17, 2019
@RiccardoM RiccardoM self-assigned this Dec 17, 2019
@RiccardoM RiccardoM mentioned this issue Dec 17, 2019
4 tasks
Desmos automation moved this from To do to Done Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/new-feature Propose the addition of a new feature that does not yet exist x/posts Post module
Projects
No open projects
Desmos
  
Done
Development

Successfully merging a pull request may close this issue.

1 participant