lib/jschat/storage/null.rb in jschat-0.3.1 vs lib/jschat/storage/null.rb in jschat-0.3.2

- old
+ new

@@ -12,9 +12,16 @@ def self.lastlog(number, room) @messages ||= [] @messages.select { |m| m['room'] == room }.reverse[0..number].reverse end + def self.search(query, room, limit) + @messages ||= [] + @messages.select do |m| + m['message'] and m['message']['message'].match(query) + end.reverse[0..limit].reverse + end + def self.find_user(options) end def self.save_user(user) end