Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

parse how would you block a messages sent from a blocked user to current user ?

Can't seem to think of or find a good blocking algorithm

1 Answer

Hello,

You could keep a list of blocked users attached to each user then check if the message has one of those user ids attached to it, either delete the message or at least not to display it.

gosh you are a genious.

how can you check if the message has one of those userIds attached to it