title: on_message and on_private_message
body: <p>I am currently using XMPP4R on <a href="https://c9.io" rel="nofollow noreferrer">Cloud9</a>.</p>
  
  <pre><code>conference.on_message {|time, nick, text|
       case text
          when /regex/i
              #Same Command as on_private_message
          end
       end
  }
  
  conference.on_private_message {|time,nick, text|
       case text
          when /regex/i
              #Same Command as on_message
          end
       end
  }
  </code></pre>
  
  <p><code>conference.on_message</code> is the conference's message from a chat, and <code>conference.on_private_message</code> is the conference's private message chat. </p>
  
  <p>I want to make both on_message and on_private_message to function as 1 instead of 2 shown above.</p>
  
  <p>I tried something like this (below), but it worked only <code>conference.on_private_message</code>. How can I make it possible?</p>
  
  <pre><code>(conference.on_message || conference.on_private_message) { |time, nick, text|
      case text
          when /regex/i
              #Same Command on both on_message and on_private_message
          end
       end  
  }
  </code></pre>