Skip to content

Commit

Permalink
Fix bug when ignoring post
Browse files Browse the repository at this point in the history
When ignoring a post, we fetch a tuple `(post_id, site)` via
`fetch_post_id_and_site_from_msg_content()`. `fetch_...` was recently
changed to return `(post_id, site, type_of_post)`. Therefore, we were
adding this to the ignorelist, and when checking the ignorelist, we
compared it with `(post_id, site)`. Of course, the comparison returned
`False`.
  • Loading branch information
csnardi committed Jan 19, 2015
1 parent 5992bde commit da4315e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chatcommunicate.py
Expand Up @@ -104,7 +104,7 @@ def watcher(ev, wrap2):
if(str(msg_ignore.owner.id) == GlobalVars.smokeDetector_user_id[ev_room]):
msg_content = msg_ignore.content_source
if(msg_content is not None):
post_id_site = fetch_post_id_and_site_from_msg_content(msg_content)
post_id_site = fetch_post_id_and_site_from_msg_content(msg_content)[0:2]
add_ignored_post(post_id_site)
ev.message.reply("Post ignored; alerts about it will no longer be posted.")
except:
Expand Down

0 comments on commit da4315e

Please sign in to comment.