Skip to content
Snippets Groups Projects
Commit 6f1aa502 authored by Mark Winter's avatar Mark Winter
Browse files

Handle suspended user accounts

parent 48c4b8df
No related branches found
No related tags found
No related merge requests found
......@@ -87,6 +87,16 @@ function new_links = add_user_links(new_users, next_depth, link_map, graph_param
end
function new_links = query_user_links(user_id, next_depth, link_map, graph_params, tokenObj)
new_links = [];
req = sprintf('/user/%s/about', user_id);
r = reddit_query(req, tokenObj);
% Need to make sure account isn't suspended
if ( isfield(r.data, 'is_suspended') && (r.data.is_suspended ~= 0) )
return;
end
%% Get newest link_limit posts (links)
req = sprintf('/user/%s/submitted?limit=%d&sort=new', user_id, graph_params.link_limit);
r = reddit_query(req, tokenObj);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment