Class for handling Last Activity queries (XEP-0012)
Get the number of seconds since last activity.
With a bare jid, this will return the number of seconds since the client was last seen (offline user query).
With a full jid, this will return the number of seconds that the client has been idle (online user query).
With a server, this will return the server or component's uptime in seconds (server / component query).
# File lib/xmpp4r/last/iq/last.rb, line 28 def seconds attributes['seconds'] ? attributes['seconds'].to_i : nil end
Set the number of seconds since last activity
# File lib/xmpp4r/last/iq/last.rb, line 34 def seconds=(val) attributes['seconds'] = val.to_s end
Set the number of seconds since last activity (chaining-friendly)
# File lib/xmpp4r/last/iq/last.rb, line 41 def set_second(val) self.seconds = val self end
For an offline user query, set the last status. (chaining-friendly)
# File lib/xmpp4r/last/iq/last.rb, line 61 def set_status(val) self.status = val self end
For an offline user query, get the last status.
# File lib/xmpp4r/last/iq/last.rb, line 48 def status self.text end
For an offline user query, set the last status.
# File lib/xmpp4r/last/iq/last.rb, line 54 def status=(val) self.text = val end