forked from signalapp/Signal-Android
-
Notifications
You must be signed in to change notification settings - Fork 163
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
Fix bug displaying user ID when quoting own message #1332
Open
aaronkerckhoff
wants to merge
4
commits into
oxen-io:dev
Choose a base branch
from
aaronkerckhoff:display-own-name-in-quote
base: dev
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
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
4 commits
Select commit
Hold shift + click to select a range
0f04929
Fix bug displaying user ID when quoting own message
aaronkerckhoff e595cfb
Improve check if author is own user when quoting messages
aaronkerckhoff ef157f9
refactor: simplify comparison
0x330a f7537ca
Merge remote-tracking branch 'upstream/dev' into display-own-name-in-…
0x330a File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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 think the issue originally arose from the author (
Contact
) being null, since we are no longer storing a contact for our own user anymore. Although I'm not sure the other cases where the call to get the contact with a session ID will return null either, in the case that the contact is deleted for some reason, or maybe you only receive messages which include quotes from messages that no longer exist (so wouldn't have stored a contact against the original message?)It might be more effective to compare
localNumber != null && authorPublicKey == localNumber
, although I'm not sure what would happen in the case of blinded messages in an open group server conversation. But probably a safer comparison than the case where the author is null. Thanks for tracking down and fixing this issue!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.
Thank you for your suggestion. Sounds good, I'm going to try this later today!
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.
Sorry for taking so long. I finally got to test this and it works. It seems your solution is better, so I'm going to implement this. Thanks for your suggestion