mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
update: packages,lua,webchat (7 files)
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
--- @class FlagResult Result of flagging a post
|
||||
--- @field flagged boolean Whether the post was flagged
|
||||
--- @field reasons string[] List of reasons for flagging
|
||||
|
||||
--- Flag a post for moderation
|
||||
--- Checks content length and banned terms
|
||||
---@param post { content?: string } Post to check
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
--- Moderation facade for forum_forge
|
||||
--- Re-exports single-function modules for backward compatibility
|
||||
|
||||
---@class ModerationModule Moderation functions module
|
||||
---@field flag_post fun(post: { content?: string }): FlagResult Flag a post for moderation
|
||||
local M = {}
|
||||
|
||||
M.flag_post = require("flag_post")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---@param timestamp number Unix timestamp in milliseconds
|
||||
---@return string Formatted time string in HH:MM AM/PM format
|
||||
function formatTime(timestamp)
|
||||
local function formatTime(timestamp)
|
||||
local date = os.date("*t", timestamp / 1000)
|
||||
local hour = date.hour
|
||||
local ampm = "AM"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
---@param username string Current username
|
||||
---@param onlineUsers string[] List of online usernames
|
||||
---@return IRCMessage Response message object
|
||||
function handleCommand(command, channelId, username, onlineUsers)
|
||||
local function handleCommand(command, channelId, username, onlineUsers)
|
||||
local parts = {}
|
||||
for part in string.gmatch(command, "%S+") do
|
||||
table.insert(parts, part)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
---@param username string Username of the user joining
|
||||
---@param userId string User identifier of the user joining
|
||||
---@return JoinMessage Join notification message object
|
||||
function userJoin(channelId, username, userId)
|
||||
local function userJoin(channelId, username, userId)
|
||||
local joinMsg = {
|
||||
id = "msg_" .. tostring(os.time()) .. "_" .. math.random(1000, 9999),
|
||||
channelId = channelId,
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
--- Notification summary facade
|
||||
--- Re-exports single-function modules for backward compatibility
|
||||
|
||||
---@class SummaryModule Notification summary functions
|
||||
---@field calculateTotal fun(notifications: Notification[]): number Calculate total count
|
||||
---@field getSeverityClass fun(severity: string): string Get CSS class for severity
|
||||
---@field prepareSummary fun(notifications: Notification[]): SummaryData Prepare summary data
|
||||
---@field severityClasses table<string, string> Severity to CSS class mapping
|
||||
---@field defaultItems Notification[] Default notification items
|
||||
local M = {}
|
||||
|
||||
M.calculateTotal = require("calculate_total")
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
--- Toast notification facade
|
||||
--- Re-exports single-function modules for backward compatibility
|
||||
|
||||
---@class ToastModule Toast notification functions
|
||||
---@field success fun(message: string, options?: ToastOptions): ToastConfig Create success toast
|
||||
---@field error fun(message: string, options?: ToastOptions): ToastConfig Create error toast
|
||||
---@field warning fun(message: string, options?: ToastOptions): ToastConfig Create warning toast
|
||||
---@field info fun(message: string, options?: ToastOptions): ToastConfig Create info toast
|
||||
local M = {}
|
||||
|
||||
M.success = require("toast_success")
|
||||
|
||||
Reference in New Issue
Block a user