3c69886320
Also: - New schema version 8 with video/image thumbnails, screenshots, sizes - Upgrade messages not at current schema version when loading messages to show in conversation - New MessageDetail react component - New ConversationHeader react component
2.8 KiB
2.8 KiB
Incoming message
<MessageDetail
message={{
disableMenu: true,
direction: 'incoming',
timestamp: Date.now(),
authorColor: 'grey',
text:
'Hello there from the new world! And this is multiple lines of text. Lines and lines and lines.',
onDelete: () => console.log('onDelete'),
}}
sentAt={Date.now() - 2 * 60 * 1000}
receivedAt={Date.now() - 10 * 1000}
contacts={[
{
phoneNumber: '(202) 555-1001',
avatarPath: util.gifObjectUrl,
},
]}
i18n={util.i18n}
/>
Message to group, multiple contacts
<MessageDetail
message={{
disableMenu: true,
direction: 'outgoing',
timestamp: Date.now(),
authorColor: 'grey',
text:
'Hello there from the new world! And this is multiple lines of text. Lines and lines and lines.',
status: 'read',
onDelete: () => console.log('onDelete'),
}}
sentAt={Date.now()}
contacts={[
{
phoneNumber: '(202) 555-1001',
profileName: 'Mr. Fire',
avatarPath: util.gifObjectUrl,
status: 'sending',
},
{
phoneNumber: '(202) 555-1002',
avatarPath: util.pngObjectUrl,
status: 'delivered',
},
{
phoneNumber: '(202) 555-1003',
color: 'teal',
status: 'read',
},
]}
i18n={util.i18n}
/>
1:1 conversation, just one recipient
<MessageDetail
message={{
disableMenu: true,
direction: 'outgoing',
timestamp: Date.now(),
authorColor: 'grey',
text:
'Hello there from the new world! And this is multiple lines of text. Lines and lines and lines.',
status: 'sending',
onDelete: () => console.log('onDelete'),
}}
contacts={[
{
phoneNumber: '(202) 555-1001',
avatarPath: util.gifObjectUrl,
status: 'sending',
},
]}
sentAt={Date.now()}
i18n={util.i18n}
/>
Errors for some users, including on OutgoingKeyError
<MessageDetail
message={{
disableMenu: true,
direction: 'outgoing',
timestamp: Date.now(),
authorColor: 'grey',
text:
'Hello there from the new world! And this is multiple lines of text. Lines and lines and lines.',
status: 'error',
onDelete: () => console.log('onDelete'),
}}
contacts={[
{
phoneNumber: '(202) 555-1001',
avatarPath: util.gifObjectUrl,
status: 'error',
errors: [new Error('Something went wrong'), new Error('Bad things')],
},
{
phoneNumber: '(202) 555-1002',
avatarPath: util.pngObjectUrl,
status: 'error',
isOutgoingKeyError: true,
errors: [new Error(util.i18n('newIdentity'))],
onShowSafetyNumber: () => console.log('onShowSafetyNumber'),
onSendAnyway: () => console.log('onSendAnyway'),
},
{
phoneNumber: '(202) 555-1003',
color: 'teal',
status: 'read',
},
]}
sentAt={Date.now()}
i18n={util.i18n}
/>