Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

chat in cloud services

$
0
0

hi , i need a small help from you guys. I'm working on cloud services now. I'm working on chat functionality .I wrote the code like this

Cloud.Chats.create({
    to_ids: ids.join(','),
    message: 'Good morning'
}, function (e) {
    if (e.success) {
        for (var i = 0; i < e.chats.length; i++) {
            var chat = e.chats[i];
            alert('Success:\n' +
                'From: ' + chat.from.first_name + ' ' + chat.from.last_name + '\n' +
                'Updated: ' + chat.updated_at + '\n' +
                'Message: ' + chat.message);
        }
    } else {
        alert('Error:\n' +
            ((e.error && e.message) || JSON.stringify(e)));
    }
});
My chat message is going. i'm getting the error like "cannot find variable:ids". can any guide to slove this issue.

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>