Skip to content

Commit

Permalink
example data [nfc]: Add jsdoc about flags property on messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
gnprice authored and chrisbobbe committed May 24, 2021
1 parent b2433dc commit 6327e93
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/__tests__/lib/exampleData.js
Expand Up @@ -329,6 +329,11 @@ const randMessageId: () => number = makeUniqueRandInt('message ID', 10000000);
* A PM, by default a 1:1 from eg.otherUser to eg.selfUser.
*
* Beware! These values may not be representative.
*
* NB that the resulting value has no `flags` property. This matches what
* we expect in `state.messages`, but not some other contexts; see comment
* on the `flags` property of `Message`. For use in an `EVENT_NEW_MESSAGE`
* action, pass to `mkActionEventNewMessage`.
*/
export const pmMessage = (args?: {|
...$Rest<PmMessage, { ... }>,
Expand Down Expand Up @@ -384,6 +389,11 @@ const messagePropertiesFromStream = (stream1: Stream) => {
* A stream message, by default in eg.stream sent by eg.otherUser.
*
* Beware! These values may not be representative.
*
* NB that the resulting value has no `flags` property. This matches what
* we expect in `state.messages`, but not some other contexts; see comment
* on the `flags` property of `Message`. For use in an `EVENT_NEW_MESSAGE`
* action, pass to `mkActionEventNewMessage`.
*/
export const streamMessage = (args?: {|
...$Rest<StreamMessage, { ... }>,
Expand Down

0 comments on commit 6327e93

Please sign in to comment.