You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Conversations in XMTP can be `DMs` or `Groups`. The underlying technicalities are the same, but DMs are essentially groups locked between two users that can be reused - basically a fixed group of 2. This is how MLS works.
58
-
59
-
Each member of a conversation has the following properties:
57
+
The new `Group` and `Dm` classes extend the `Conversation` class and provide specific functionality based on the conversation type.
60
58
61
59
```tsx
62
-
inboxId: string; // unique identifier from the XMTP network
// narrow the type to Group to access the group name
64
+
if (conversationinstanceofGroup) {
65
+
console.log(group.name);
66
+
}
67
+
68
+
// narrow the type to Dm to access the peer inboxId
69
+
if (conversationinstanceofDm) {
70
+
console.log(conversation.peerInboxId);
71
+
}
72
+
}
67
73
```
68
74
69
-
To fetch an ethereum address in a DM, you can use a script like the following:
75
+
## Working with addresses
76
+
77
+
Because XMTP is interoperable, you may interact with inboxes that are not on your app. In these scenarios, you will need to find the appropriate inbox ID or address.
0 commit comments