mirror of https://github.com/waku-org/js-waku.git
Get messages from store in chronological order
This commit is contained in:
parent
de3aea626a
commit
fb7e9f2b9e
|
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Added
|
||||
- Implement [Waku v2 Light Push protocol](https://rfc.vac.dev/spec/19/).
|
||||
- Expose `Direction` enum from js-waku root (it was only accessible via the proto module).
|
||||
|
||||
## [0.4.0] - 2021-05-18
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ import util from 'util';
|
|||
|
||||
import {
|
||||
ChatMessage,
|
||||
Direction,
|
||||
Environment,
|
||||
getStatusFleetNodes,
|
||||
StoreCodec,
|
||||
|
@ -80,6 +81,7 @@ export default async function startChat(): Promise<void> {
|
|||
const messages = await waku.store.queryHistory({
|
||||
peerId,
|
||||
contentTopics: [ChatContentTopic],
|
||||
direction: Direction.FORWARD,
|
||||
});
|
||||
messages?.map((msg) => {
|
||||
if (msg.payload) {
|
||||
|
|
|
@ -13,6 +13,6 @@ export {
|
|||
|
||||
export { WakuRelay, RelayCodec } from './lib/waku_relay';
|
||||
|
||||
export { WakuStore, StoreCodec } from './lib/waku_store';
|
||||
export { Direction, WakuStore, StoreCodec } from './lib/waku_store';
|
||||
|
||||
export * as proto from './proto';
|
||||
|
|
|
@ -11,6 +11,8 @@ import { Direction, HistoryRPC } from './history_rpc';
|
|||
|
||||
export const StoreCodec = '/vac/waku/store/2.0.0-beta3';
|
||||
|
||||
export { Direction };
|
||||
|
||||
export interface Options {
|
||||
peerId: PeerId;
|
||||
contentTopics: string[];
|
||||
|
|
Loading…
Reference in New Issue