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

Fixes for v3.0.1 #366

Merged
merged 17 commits into from
Jul 14, 2023
Merged

Fixes for v3.0.1 #366

merged 17 commits into from
Jul 14, 2023

Conversation

reyamir
Copy link
Collaborator

@reyamir reyamir commented Jul 13, 2023

Changes

@reyamir reyamir marked this pull request as ready for review July 14, 2023 07:12
const chats = getSnapshot(self.privMessages)
chats.forEach((chat) => {
if (chat.pubkey === self.pubkey) {
chat.pubkey = chat.tags.find((el) => el[0] === "p")[1]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the tag is the recipient, pubkey is sender.

now you don't know who sent the message

no way this can render right

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it render fine, it made it for this case
(Home Screen)

current user -> send message to A -> A not response -> last message display in home screen is current user
current user -> send message to B -> B not response -> last message display in home screen is current user too

so I made it get recipient for this case to prevent duplicate items in home screen, and ignore the rest
message's content will not change, this behavior similar to telegram too

Screenshot 2023-07-14 at 21 34 55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment