Skip to content

Commit

Permalink
feat: expose more metadata in message feed
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmbl committed May 20, 2024
1 parent e8e42a3 commit f567d1d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 4 deletions.
4 changes: 4 additions & 0 deletions packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## [1.9.2] - 2024-05-20

- feat: expose more metadata in messages feed

## [1.9.1] - 2024-04-26

- chore: log unknown api errors
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dialectlabs/sdk",
"version": "1.9.1",
"version": "1.9.2",
"type": "module",
"repository": "[email protected]:dialectlabs/sdk.git",
"author": "dialectlabs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export class MessageMetadataDto {
}

export interface MessageDto {
readonly id: string
readonly id: string;
readonly owner: string;
readonly text: number[];
readonly timestamp: number;
Expand Down
2 changes: 2 additions & 0 deletions packages/sdk/src/internal/wallet/data-service-wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ export class DataServiceWalletMessages implements WalletMessages {
author: it.owner,
timestamp: new Date(it.timestamp),
text: this.textSerde.deserialize(new Uint8Array(it.text)),
id: it.id,
metadata: it.metadata,
}));
}

Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/messaging/messaging.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export interface MessageMetadata {
}

export interface ThreadMessage {
id: string
id: string;
text: string;
timestamp: Date;
author: ThreadMember;
Expand Down
7 changes: 6 additions & 1 deletion packages/sdk/src/wallet/wallet.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import type {
DappAddress,
} from '../address/addresses.interface';
import type { AccountAddress } from '../auth/auth.interface';
import type { ThreadsGeneralSummary } from '../messaging/messaging.interface';
import type {
MessageMetadata,
ThreadsGeneralSummary,
} from '../messaging/messaging.interface';

export interface Wallets {
readonly address: AccountAddress;
Expand Down Expand Up @@ -113,9 +116,11 @@ export interface WalletMessages {
}

export interface DappMessage {
id: string;
text: string;
timestamp: Date;
author: AccountAddress;
metadata?: MessageMetadata;
}

export interface FindDappMessageQuery {
Expand Down

0 comments on commit f567d1d

Please sign in to comment.