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

fix: sendMessage with quoted message id #3260

Merged

Conversation

alwinlubbers
Copy link
Contributor

@alwinlubbers alwinlubbers commented Aug 29, 2024

Now using window.Store.Msg.getMessagesById instead of window.Store.Msg.get

PR Details

This PR fixes the exception that was thrown when using client.sendMessage() with a quotedMessageId in the MessageSendOptions parameter.

Description

It seemed like window.Store.get() couldn't get a message, even with a valid serialized chat message id.

The window.Store.Msg.getMessagesById function was taken from here:

let messagesObject = await window.Store.Msg.getMessagesById([messageId]);

Related Issue

closes #3259

Motivation and Context

This will solve the problem of being unable to send messages with a quote attached.

How Has This Been Tested

I've tested this version with my local Node.js install (system/os details can be found in the mentioned issue).

I've tried sending a couple of messages in private and group chats. With both messages from me and others. It has also been tested on a clean install (without auth).

Types of changes

  • Dependency change
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • I have updated the documentation accordingly (index.d.ts).

Now using `window.Store.Msg.getMessagesById` instead of `window.Store.Msg.get`
Copy link
Collaborator

@shirser121 shirser121 left a comment

Choose a reason for hiding this comment

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

Good job

Jlam9

This comment was marked as duplicate.

@arturhc
Copy link

arturhc commented Sep 13, 2024

Hi there! Just checking in, do you have any idea when this PR might be merged?

@shirser121
Copy link
Collaborator

@alechkos @tuyuribr @tuyuribr3 you should approve this

@alechkos alechkos merged commit 951ff7b into pedroslopez:main Sep 14, 2024
1 check passed
@alwinlubbers alwinlubbers deleted the fix-sendmessage-quotedmessageid branch September 14, 2024 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sendMessage with quote will raise an exception
6 participants