Closed TorchedSammy closed 1 year ago
i think this would be a better way to deliver motds and or other changes to people who just do an update without reading anywhere else (or users on master branch honestly..)
this would throw a hilbish.notification
hook which has a message table. valid fields would be:
icon
: Unicode icon preferred for the notification. we should maybe add presets, and ask that people keep to emojis instead of things from custom fontstitle
: title of the message (like an email subject maybe)text
: message textchannel
: where the message came fromsummary
: a short briefing on what the mssage is aboutnotifications will be interacted with via the hilbish.messages
interface and this could be done entirely in Lua since this system is actually pretty simple
it can provide the following functions:
send(info)
: sends a message. the info
is the message table/object previously mentionedread(idx)
: mark message at idx as readdelete(idx)
: deletes message at idxreadAll()
: mark all messages as readclear()
: deletes all messages the difference between marking a notification as read and just deleting it will be up to the user. by default, leaving a notification as read will just leave it but not be visible.
I also think having both message and notification instead of just one makes sense. sending a messages gives the user a notification.
with the channel idea, the hilbish motd could instead be a message with the hilbish-motd
channel.
this can allow the messages to also be a nice relay of changes when updating.
since things can happen while a user is running commands (say a job), i think a unified notifying system would be good to add.
users can then integrate it where they want, an icon in the prompt for example.