Skip to content

Commit

Permalink
Adding Public filter.
Browse files Browse the repository at this point in the history
  • Loading branch information
Douglas Paul Perkins committed Dec 22, 2014
1 parent 5c4f3c0 commit 33e9bca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion PumpTweet.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ def connect_to_servers():

# Returns true if the activity is public.
def ispublic(activity):
for recipient in (activity.to + activity.cc):
recipients = []
if 'to' in activity.__dict__.keys(): recipients += activity.to
if 'cc' in activity.__dict__.keys(): recipients += activity.cc

for recipient in recipients:
if recipient.id == Public.ENDPOINT:
return True

Expand Down

0 comments on commit 33e9bca

Please sign in to comment.