Created
September 6, 2009 13:44
-
-
Save lestrrat/181807 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/lib/Werewolf/BBS/Controller/Chatter.pm | |
+++ b/lib/Werewolf/BBS/Controller/Chatter.pm | |
@@ -177,8 +177,17 @@ sub view | |
my $village = $c->stash->{village}; | |
my $chatter_api = $self->api('Chatter'); | |
- my $chat = $chatter_api->find( $chat_id ); | |
- if (! $chat || $chat->village_id ne $village->id) { | |
+ | |
+ my $chat; | |
+ { | |
+ my $where = $self->build_where_with_visibility( | |
+ village_id => $c->stash->{village_id}, | |
+ member_id => $c->user->id, | |
+ ); | |
+ local $chatter_api->{resultset_constraints} = $where; | |
+ $chat = $chatter_api->find( $chat_id ); | |
+ } | |
+ if (! $chat ) { | |
Pixis::Web::Exception::FileNotFound->throw(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment