OSDN Git Service

update message
authorISHIKAWA Mutsumi <ishikawa@hanzubon.jp>
Fri, 19 Oct 2012 09:06:00 +0000 (18:06 +0900)
committerISHIKAWA Mutsumi <ishikawa@hanzubon.jp>
Fri, 19 Oct 2012 09:06:00 +0000 (18:06 +0900)
mubot4fb.pl

index 3bc6f5e..e4e9986 100755 (executable)
@@ -225,20 +225,20 @@ sub _delete_prev {
 
 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;