-
-
Notifications
You must be signed in to change notification settings - Fork 304
Visual BUG fix after adding new friend+DM #1541
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
Open
LW-Davide
wants to merge
14
commits into
spacebarchat:master
Choose a base branch
from
LW-Davide:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
843be23
Visual BUG fix after adding new friend+DM
LW-Davide d1e8c55
Deleting settings along with the account
LW-Davide 6aebd7e
Handle deleted users
LW-Davide 7970d35
Handle deleted users (gateway)
LW-Davide 1c3f96f
Merge branch 'master' into master
LW-Davide 6c67a07
Integrating original commit c671db2
LW-Davide 9ccad75
Fix for the BUG "All users show online status 24/7" plus 5s to allow …
LW-Davide ac59aa4
Merge pull request #1 from spacebarchat/master
LW-Davide 864bd62
Merge pull request #2 from spacebarchat/master
LW-Davide c5f678f
setTimeout from 5s to 10s
LW-Davide d05baa6
Auto creating DM channel after adding a friend
LW-Davide a6c87b3
Merge pull request #3 from spacebarchat/master
LW-Davide bf262db
Merge pull request #4 from spacebarchat/master
LW-Davide 12a6ae6
Merge pull request #5 from spacebarchat/master
LW-Davide File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have to test, but iirc this causes discord clients to crash (they need at least one recipient)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(specifically causes a crash in case there's a DM where the other user's account has been deleted)
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add a check in case the account is deleted, Discord doesn't like the creator to be in the recipients and causes bugs.
After adding a new friend & opening the DM:

(It fixes itself with a page reload, but it's still annoying)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the account is deleted, the relation will return exactly one recipient, which is exactly what this code was trying to work around iirc (as all user data is deleted together with the author)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but it's causing a bug for non-deleted users.
Also found another issue, when trying to delete an account:
update or delete on table "users" violates foreign key constraint "FK_8ff3d1961a48b693810c9f99853" on table "user_settings_protos" Key (id)=(1473723585167176120) is still referenced from table "user_settings_protos".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's the easy solution, i think @ChrisChrome still has that in uncommitted changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added another commit, which solves the user deletion error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also tested the two patches, and the Discord client doesn't crash, the chat itself becomes a "self-chat" after the second user gets deleted
Is a "user deleted" function implemented? Or the chat should just disappear?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few commits to handle deleted users. If you can, please check them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the result on client side when a user is deleted:
DS:


Fermi:
