sub _delete {
my ($me, $args, $post_id) =@_;
- my $resp_msg;
+ my ($resp_msg,$resp);
$me->{dbh}->begin_work;
- if ($me->_db_delete({fb_post_id => $post_id, submitter => $args->{who}})) {
+ if ($resp = $me->_db_delete({fb_post_id => $post_id, submitter => $args->{who}})) {
# fb 側のエントリを削除しないといけない
if ($me->_fb_delete($post_id)) {
$me->{dbh}->commit;
$resp_msg = $args->{who} . ': 削除しました ' . $me->_fb_post_uri($post_id);
} else {
- $resp_msg = 'fail to delete facebook post: ' . $me->_fb_post_uri($post_id);
+ $resp_msg = '削除に失敗しましたよ? ' . $me->_fb_post_uri($post_id);
$me->{dbh}->rollback;
}
} else {
- $resp_msg = 'fail to delete facebook post from DB: ' . $me->_fb_post_uri($post_id);
+ $resp_msg = 'そんな投稿ないよ? ' . $me->_fb_post_uri($post_id);
$me->{dbh}->rollback;
}
return $resp_msg;