Skip to content

Commit

Permalink
Add an implementation for Activity.__hash (#265)
Browse files Browse the repository at this point in the history
* Implement __hash for Activity (closes #140)

* Add doc comments for Activity.__hash

* Change Activity hash to just `Activity.parent:__hash()`

Co-authored-by: dekkonot <[email protected]>
  • Loading branch information
Dekkonot and Dekkonot authored Oct 7, 2020
1 parent 520cd11 commit 7246e0d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions libs/containers/Activity.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ function Activity:_loadMore(data)
self._emoji_animated = emoji and emoji.animated
end

--[=[
@m __hash
@r string
@d Returns `Activity.parent:__hash()`
]=]
function Activity:__hash()
return self._parent:__hash()
end

--[=[@p start number/nil The Unix timestamp for when this Rich Presence activity was started.]=]
function get.start(self)
return self._start
Expand Down

0 comments on commit 7246e0d

Please sign in to comment.