Bobby Newland
Posts: 0
Joined: Wed Jul 23, 2014 12:29 pm

Private Messages

Hi,

Im trying to figure out the best way to allow users to send private messages between one another. I reviewed and understand the following tutorials

http://devcenter.appery.io/tutorials/...

http://devcenter.appery.io/tutorials/...

Which i know i will have to implement. But my question is who do I allow users to share ACL rights for one database entry ? So if a user clicks on another user and the message dialog pops up and the users types a message and it stores it in the database how do i ensure that the other user is the only on to see it?

Thanks,
Bobby

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Private Messages

Hi Bobby,

You can implement it with DB collection:

Messages (text:string, user1:pointerToUser, user2: pointerToUser, acl:object)

So with this Collection you can:
1 Query messages only with certain user1 and user2 to display it in messages list. See details: http://devcenter.appery.io/documentat...

2 Set certain ACL in accordance to your needs. For example following one is to allow read/write only for two users:

{
"53aceac0e4b07420882b3f10":{"read":true,"write":true},
"52aceac0e4b07420882b3f12":{"read":true,"write":true}
}

Regards.

Return to “Issues”