jschat 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/jschat/storage/mongo.rb +1 -1
- metadata +2 -2
data/lib/jschat/storage/mongo.rb
CHANGED
@@ -24,7 +24,7 @@ module JsChat::Storage
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def self.lastlog(number, room)
|
27
|
-
@db['events'].find({ :room => room }, { :limit => number, :sort => ['time', Mongo::
|
27
|
+
@db['events'].find({ :room => room }, { :limit => number, :sort => ['time', Mongo::DESCENDING] }).to_a
|
28
28
|
end
|
29
29
|
|
30
30
|
# TODO: use twitter oauth for the key
|