Skip to content

Commit

Permalink
Update socialize.viewingConversation in API docs
Browse files Browse the repository at this point in the history
Update mention of `viewingConversation` in section about updateReadState to `socialize.viewingConversation` and put into highlight.
  • Loading branch information
StorytellerCZ committed Feb 12, 2019
1 parent 1245800 commit 0069e06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion API.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ let user = Meteor.users.findOne({username:"copleykj"});
conversation.addParticipant(user);
```

**updateReadState(state)** - Manually update the read state of the conversation for the currentUser.. This is generally handled automatically through subscribing to the viewingConversation publication. Subscribing to this subscription not only sets the conversation as read by the user but also notes the user as observing the conversation so that when a new message is added, the read state is only set to false for users not observing. Unsubscribing from this subscription sets observing to false and read will be set to true for the participant when new messages come in.
**updateReadState(state)** - Manually update the read state of the conversation for the currentUser.. This is generally handled automatically through subscribing to the `socialize.viewingConversation` publication. Subscribing to this subscription not only sets the conversation as read by the user but also notes the user as observing the conversation so that when a new message is added, the read state is only set to false for users not observing. Unsubscribing from this subscription sets observing to false and read will be set to true for the participant when new messages come in.

```javascript
conversation.updateReadState(false); //set the conversation to unread
Expand Down

0 comments on commit 0069e06

Please sign in to comment.