diff --git a/docs/api/hilbish/hilbish.messages.md b/docs/api/hilbish/hilbish.messages.md new file mode 100644 index 0000000..1e37205 --- /dev/null +++ b/docs/api/hilbish/hilbish.messages.md @@ -0,0 +1,107 @@ +--- +title: Module hilbish.messages +description: No description. +layout: doc +menu: + docs: + parent: "API" +--- + +
+
+

+hilbish.messages.all() + + + +

+ + +#### Parameters +This function has no parameters. +
+ +
+
+

+hilbish.messages.clear() + + + +

+ + +#### Parameters +This function has no parameters. +
+ +
+
+

+hilbish.messages.delete() + + + +

+ + +#### Parameters +This function has no parameters. +
+ +
+
+

+hilbish.messages.read() + + + +

+ + +#### Parameters +This function has no parameters. +
+ +
+
+

+hilbish.messages.send(message) + + + +

+ +Sends a message. +#### Parameters +`message` **`hilbish.message`** +
+ +
+
+

+hilbish.messages.readAll() + + + +

+ + +#### Parameters +This function has no parameters. +
+ +
+
+

+hilbish.messages.unreadCount() + + + +

+ + +#### Parameters +This function has no parameters. +
+ diff --git a/nature/hummingbird.lua b/nature/hummingbird.lua index 581e92c..271c3cf 100644 --- a/nature/hummingbird.lua +++ b/nature/hummingbird.lua @@ -1,3 +1,4 @@ +-- @module hilbish.messages local bait = require 'bait' local commander = require 'commander' local lunacolors = require 'lunacolors' @@ -46,7 +47,7 @@ end function hilbish.messages.read(idx) local msg = M._messages[idx] - if msg then + if msg then M._messages[idx].read = true unread = unread - 1 end