How to block abusive users (Apple rejected App based on this) #appcelerator

119 views Asked by At

ArrowDB documents does not provide a method for blocking users on the messages, events and users side of things. I tried solving this by creating a custom object that had the (person to be blocked username) as the classname and the (person blocking) as a field within this object. So every time the person to be blocked queried, the custom objects on arrowdb would be queried for classname pertaining to his username and pull information from the field within (that has people that blocked him) and then take that information to perform a $nin(exclude) on whatever query he was doing. However it broke down as shown below, I tried changing the e.objects.length to e.blockusernames.length or e.blockusername.length, didn't work as it always could not read length of undefined

Cloud.Objects.query({
    classname: blockusername (this is the username stored as a variable)
}, function (e) {
    if (e.success) {
        console.log('Success:\n' +
            'Count: ' + e.objects.length);
        for (var i = 0; i < e.objects.length; i++) {
            var iblockusername = e.blockusername[i]; 
            console.log('id is: '+ iblockusername.blockid);

Is there something I'm doing wrong or can I block users from seeing events, messages & from seeing other users in a different way? Using Titanium SDK in Studio.

0

There are 0 answers