ConversationContext: conversationType => type

And a group conversation example to messages.md
This commit is contained in:
Scott Nonnenberg 2018-04-13 18:01:02 -07:00
parent d8d803d36d
commit 7bd747a796
No known key found for this signature in database
GPG key ID: 5F82280C35134661
3 changed files with 29 additions and 4 deletions

View file

@ -34,6 +34,31 @@ const View = Whisper.MessageView;
</util.ConversationContext>
```
### In a group conversation
```jsx
const outgoing = new Whisper.Message({
type: 'outgoing',
body: 'How are you doing this fine day?',
sent_at: Date.now() - 18000,
});
const incoming = new Whisper.Message(Object.assign({}, outgoing.attributes, {
source: '+12025550003',
type: 'incoming',
}));
const View = Whisper.MessageView;
<util.ConversationContext theme={util.theme} type="group" >
<util.BackboneWrapper
View={View}
options={{ model: incoming }}
/>
<util.BackboneWrapper
View={View}
options={{ model: outgoing }}
/>
</util.ConversationContext>
```
### With an attachment
#### Image with caption

View file

@ -88,7 +88,7 @@ const incoming = new Whisper.Message(Object.assign({}, outgoing.attributes, {
}),
}));
const View = Whisper.MessageView;
<util.ConversationContext theme={util.theme} conversationType="group">
<util.ConversationContext theme={util.theme} type="group">
<util.BackboneWrapper
View={View}
options={{ model: incoming }}