push-protocol / push-sdk

Push SDK is a growing Monorepo of packages that provide solutions for a wide range of development tasks one might come across while building on top of Push protocol. It is a Javascript-based group of packages that enables easy usage of imperative communication tools for Web3
Other
75 stars 52 forks source link

😈 [Improvement Proposal] - Add the ability to fetch single messages with chatId and cid #1386

Closed kinga112 closed 3 months ago

kinga112 commented 3 months ago

Proposal name

Fetch one message

Describe the Proposal

Fetch one message using chatId and cid.

Use Case

If you want to load more than 30 messages, but you don't want it to take a while and you create a recursive function to fetch and display messages. If a reply type is referenced to a message from 30+ messages ago, that message will not be found. Be able to look up the single message so data can be fetched and referenced.

Current Limitations

Need an efficient way to fetch messages quickly but also find references to messages that might not be included in chat.history.