Skip to content

News

News

News publishing platform with articles, categories, live broadcasts with real-time chat, reactions, viewer tracking, scaleform overlays, and moderation (mute/remove messages).

Database Tables

TablePurpose
phone_newsArticles -- identifier, author_name, author_avatar, author_verified, title, content, media_url, media_type, category, is_live, live_viewers, views
phone_snap_accountsRead -- resolves author profile (display_name, avatar)

Server Callbacks

CallbackPurpose
gcphone:news:getArticlesFetches articles with optional category filter and pagination
gcphone:news:getLiveNewsReturns currently active live broadcasts
gcphone:news:publishArticlePublishes an article (job-restricted)
gcphone:news:startLiveStarts a live broadcast with optional scaleform
gcphone:news:joinLiveJoins a live broadcast as a viewer
gcphone:news:leaveLiveLeaves a live broadcast
gcphone:news:sendLiveMessageSends a chat message in a live broadcast
gcphone:news:sendLiveReactionSends an emoji reaction in a live broadcast
gcphone:news:removeLiveMessageHost removes a chat message (moderation)
gcphone:news:muteLiveUserHost mutes a user in a live broadcast
gcphone:news:setScaleformUpdates the live scaleform overlay
gcphone:news:getScaleformGets the current scaleform for a live broadcast
gcphone:news:endLiveEnds a live broadcast
gcphone:news:deleteArticleDeletes own article
gcphone:news:viewArticleIncrements view count on an article
gcphone:news:getCategoriesReturns the configured news categories
gcphone:news:getAccountReturns the Snap account (shared profile system)
gcphone:news:createAccountCreates a Snap account for news
gcphone:news:updateAccountUpdates the news profile (display name, avatar, bio)

Config Options

lua
Config.News = {
    MaxArticlesPerDay = 20,
    AllowLive         = true,
    MaxLiveDuration   = 3600,
    Categories = {
        { id = 'general', label = 'General', icon = '...' },
        { id = 'urgent',  label = 'Urgente', icon = '...' },
        ...
    },
}

Config.PublishJobs.news = { 'news', 'reporter', 'journalist' }

Config.Security.RateLimits.news = 2500

Exports

None.

Released under GPL-3.0 License