Skip to content

Fixes for v3.0.1#366

Merged
earonesty merged 17 commits into
OpenAgentsInc:mainfrom
reyamir:fixs-3.0.1-1
Jul 14, 2023
Merged

Fixes for v3.0.1#366
earonesty merged 17 commits into
OpenAgentsInc:mainfrom
reyamir:fixs-3.0.1-1

Conversation

@reyamir

@reyamir reyamir commented Jul 13, 2023

Copy link
Copy Markdown
Contributor

Changes

@reyamir reyamir marked this pull request as ready for review July 14, 2023 07:12
Comment thread app/models/UserStore.ts
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
Copy Markdown
Contributor

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
Copy Markdown
Contributor 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

Labels

None yet

Projects

None yet

2 participants