Skip to content

Commit dec43fc

Browse files
committed
Add new messages
1 parent 3919189 commit dec43fc

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

components/ChatUsers.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import {
1111
} from 'react-native';
1212

1313
import Icon from 'react-native-vector-icons/MaterialIcons';
14-
import User from './User';
14+
15+
import {User} from './User';
1516

1617
import styles from '../styles';
1718

components/Conversation.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ class BareConversation extends Component {
7979
publishTypingState(this.props.currentUserId, typing);
8080
}
8181

82+
onMessageReceived(m) {
83+
this.props.addMessage([m.message]);
84+
}
85+
8286
onPresenceChange(presenceData) {
8387
switch (presenceData.action) {
8488
case 'join':

container.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ class BareContainer extends Component {
6868
/// which we will extract through our url handler and begin the PubNub connect handshake.
6969
Linking.addEventListener('url',
7070
event => {
71-
console.log('yo son i got', event);
7271
this.props.connect(AuthenticationService.getTokenFromUri(event.url));
7372
});
7473

services/pubnub.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export const subscribe = (presenceHandler, messageHandler) => {
101101

102102
connect().then(({ pubnub }) => {
103103
pubnub.subscribe({
104-
channel,
104+
channels: [channel],
105105
withPresence: true,
106106
})
107107
});

0 commit comments

Comments
 (0)