lib/lifen/status.rb in lifen-1.3.0 vs lib/lifen/status.rb in lifen-1.4.0
- old
+ new
@@ -5,14 +5,18 @@
attribute :user, "Lifen::User"
attribute :unread, Integer, default: 0
- def refresh
+ def reload
json = client.get("central/api/chats/status")
self.unread = json["unread"]
+
+ self
end
+
+ alias refresh reload
private
def client
@client ||= user.client
\ No newline at end of file