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

Add ability to send "System messages" via DMs #2534

Open
taoeffect opened this issue Jan 23, 2025 · 2 comments
Open

Add ability to send "System messages" via DMs #2534

taoeffect opened this issue Jan 23, 2025 · 2 comments
Labels
App:Frontend Kind:Enhancement Improvements, new features, performance upgrades, etc. Note:Contracts Issues involving modifications to contracts Note:UI/UX

Comments

@taoeffect
Copy link
Member

Problem

Sometimes we want to be able to inform users of important upcoming changes.

For example, for 2.0, we're going to be forced to wipe all data on the server one final time, and we'd like to give users an in-app heads up about this.

Likewise, each time a new version is released, we want users to see the release notes, and any accompanying blog.

Solution

  1. Create a DM to the user from Group Income (with the GI logo) if one doesn't exist.
  2. In this chatroom contract, have it maintain a state (as a simple object, e.g. "systemMessages") of system messages to keep track of which ones we've already sent (to avoid sending duplicates).
  3. Check if we haven't yet sent this system message using the chatroom state mentioned in (2). If we haven't, then send the message. Create a special action on the chatroom contract that both posts the message and updates the chatroom state "systemMessages" as having sent that particular system message.

Example "systemMessages":

"systemMessages": {
  "2.0update-warning": true // indicates we've already sent this DM
}
@taoeffect taoeffect added App:Frontend Kind:Enhancement Improvements, new features, performance upgrades, etc. Note:Contracts Issues involving modifications to contracts Note:UI/UX labels Jan 23, 2025
@SebinSong SebinSong self-assigned this Jan 26, 2025
@snowteamer
Copy link
Collaborator

What are the pros and cons of sending such system messages via DMs rather than via notifications?

@SebinSong SebinSong removed their assignment Jan 28, 2025
@taoeffect
Copy link
Member Author

@snowteamer Sending it via notifications was my initial thought, but then I decided against it. I don't remember exactly why, but one thing I can think of now is that in-app notifications aren't setup to handle large amounts of text or markdown formatting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App:Frontend Kind:Enhancement Improvements, new features, performance upgrades, etc. Note:Contracts Issues involving modifications to contracts Note:UI/UX
Projects
None yet
Development

No branches or pull requests

3 participants