mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-25 10:58:19 +01:00
ConversationContext: conversationType => type
And a group conversation example to messages.md
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user