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

Update backend Message type to add "visibleToUids" array to enable re-rendering messages after changes #182

Closed
h1divp opened this issue Feb 25, 2024 · 1 comment · Fixed by #192
Assignees
Labels
Backend📡 Issues corresponding to the backend/API. Easy A simple problem or change that needs to be fixed or made. Optimization Changes that makes functionality faster or use less memory

Comments

@h1divp
Copy link
Collaborator

h1divp commented Feb 25, 2024

What happens if a user edits or otherwise updates a message in any way shape or form?

This could include changing message content, replying to a message, whispering, changing their display name, etc. But this would entail needing a way for, after an update is made, to re-render the message in question to all of the users who already see it.

I believe that this should be done by storing the UIDs of the users that the message is sent to within the message (generated by the getNearbyUsers() function), so that they can be re-used later with other socket API endpoints.

Please make this type change. This array attribute can be optional (using the optional property accessor ?.) as many functions probably don't need it. This would also save yourself some time from having to update a bunch of functions to match the new type.

Please comment below to be assigned this issue.

@h1divp h1divp added Optimization Changes that makes functionality faster or use less memory Backend📡 Issues corresponding to the backend/API. Easy A simple problem or change that needs to be fixed or made. labels Feb 25, 2024
@aaditkamat
Copy link
Collaborator

Since #183 requires this, I thought I'll update the Message type first

@aaditkamat aaditkamat self-assigned this Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend📡 Issues corresponding to the backend/API. Easy A simple problem or change that needs to be fixed or made. Optimization Changes that makes functionality faster or use less memory
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants