How to use the @cometchat-pro/react-native-chat.CometChat.MessagesRequestBuilder function in @cometchat-pro/react-native-chat

To help you get started, we’ve selected a few @cometchat-pro/react-native-chat examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cometchat-pro-samples / react-native-chat-app / chatApp / src / ChatScreen.js View on Github external
constructor() {
        super()
        this.state = {
            messages: [],
            txtMessage: '',
            mediaMsg: '',
            refreshing: false,
            autoScroll: true,
            fullVideo: 0,
            fullVideoStream: ''
        }
        this.messagesRequest = new CometChat.MessagesRequestBuilder().setUID(uid).setLimit(30).build();
        this.receiveMessages()
        this.fetchMessages = this.fetchMessages.bind(this);
        this._handleRefresh = this._handleRefresh.bind(this);
        this.fetchMessages();
        this.messagelist;
        this.sendMessage = this.sendMessage.bind(this);
        this.sendMediaMessage = this.sendMediaMessage.bind(this);
        this.sendMsg = this.sendMsg.bind(this);
        this.imagePicker = this.imagePicker.bind(this);
        this.documentPicker = this.documentPicker.bind(this);
        this.showActionSheet = this.showActionSheet.bind(this);
        this.addUserListner()
        this.keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', this._keyboardDidShow);
        let receiverType = CometChat.RECEIVER_TYPE.USER;
        typingNotification = new CometChat.TypingIndicator(uid, receiverType);
    }
github cometchat-pro-samples / react-native-chat-app / chatApp / src / GroupChatScreen.js View on Github external
constructor() {
        super()
        this.state = {
            messages: [],
            txtMessage:'',
            mediaMsg: '',
            refreshing: false,
            autoScroll : true,
        }
        this.getLoggedInUser()
        this.messagesRequest = new CometChat.MessagesRequestBuilder().setGUID(guid).setLimit(30).build();
        this.receiveMessages()
        this.fetchMessages = this.fetchMessages.bind(this)
        this._handleRefresh = this._handleRefresh.bind(this)
        this.fetchMessages();
        this.messagelist;
        this.sendMessage = this.sendMessage.bind(this);
        this.sendMediaMessage = this.sendMediaMessage.bind(this);
        this.sendMsg = this.sendMsg.bind(this);
        this.imagePicker = this.imagePicker.bind(this);
        this.documentPicker = this.documentPicker.bind(this);
        this.showActionSheet = this.showActionSheet.bind(this);
        this.keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', this._keyboardDidShow);
    }