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

chat: "tagged" messages #57

Open
goto-bus-stop opened this issue Aug 31, 2016 · 0 comments · May be fixed by #512
Open

chat: "tagged" messages #57

goto-bus-stop opened this issue Aug 31, 2016 · 0 comments · May be fixed by #512

Comments

@goto-bus-stop
Copy link
Member

Some messages might want special handling based on how they are sent. For example, a bot posting links from reddit into the chat so they can be styled differently, or a waitlist raffle message that should ping everybody in the waitlist, or an IRC /me style action message.

One way to solve this generically could be tags. Next to the message contents, a message can have one or more tags, similar to IRCv3 message tags. It could be a list of strings, probably:

{
  "command": "sendChat",
  "data": {
    "message": "[r/kpop] f(x) – FANCY NEW SONG",
    "tags": ["reddit"]
  } | {
    "message": "@Admin started a raffle!",
    "tags": ["raffleStart"]
  } | {
    "message": "waves",
    "tags": ["action"]
  }
}

But there might be uses for tags with more data attached as well, in which case it'd become something like

{
  "tags": {
    "action": true
  } | {
    "raffleEnd": { "winner": "<user id>" },
  }
}

Initially these tags would simply be passed through. Once role-based ACL is implemented there could be roles for sending tags at all: chat.tags, and for using specific tags chat.tags.action, chat.tags.closeEveryone'sBrowser, etc.

goto-bus-stop added a commit to goto-bus-stop/u-wave-core that referenced this issue Apr 9, 2017
@goto-bus-stop goto-bus-stop linked a pull request May 20, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant