Skip to content

Messages

Messages

SMS messaging with 1-on-1 conversations, WaveChat group messaging, group invites, WaveChat statuses (stories), GPS sharing via %pos%, auto-reply, media attachments, and blocked contact enforcement.

Database Tables

TablePurpose
phone_messagesSMS messages -- transmitter, receiver, message, media_url, is_read, owner, time
phone_chat_groupsGroup chat metadata -- owner_identifier, name, avatar
phone_chat_group_membersGroup membership -- group_id, identifier, role (owner/member)
phone_chat_group_invitesPending group invitations -- group_id, inviter/target identifier, status
phone_chat_group_messagesGroup messages -- group_id, sender_identifier, sender_number, message, media_url
phone_wavechat_statuses24-hour statuses -- identifier, phone_number, media_url, media_type, caption, views, expires_at

Server Callbacks

CallbackPurpose
gcphone:getMessagesReturns all messages for the player
gcphone:getConversationReturns a conversation with a specific phone number
gcphone:sendMessageSends an SMS (supports %pos% GPS, media, auto-reply, blocked check)
gcphone:deleteMessageDeletes a single message
gcphone:deleteConversationDeletes all messages in a conversation
gcphone:markAsReadMarks messages from a number as read
gcphone:getUnreadCountReturns the unread message count
gcphone:wavechatGetGroupsReturns all groups the player belongs to
gcphone:wavechatGetInvitesReturns pending group invitations
gcphone:wavechatCreateGroupCreates a group and sends invitations to members
gcphone:wavechatGetGroupMessagesReturns messages for a group (limit 30)
gcphone:wavechatRespondInviteAccept or decline a group invitation
gcphone:wavechatSendGroupMessageSends a message in a group (rate-limited, auto-trims to 30 messages)
gcphone:wavechatGetStatusesReturns visible WaveChat statuses (own + contacts)
gcphone:wavechatCreateStatusCreates a 24-hour status with media
gcphone:wavechatMarkStatusViewedIncrements view count on a status (debounced per 5 minutes)
gcphone:setAutoReplyEnables/disables auto-reply with a custom message
gcphone:getAutoReplyReturns the current auto-reply state

Config Options

lua
Config.Messages = {
    MaxMessages      = 500,
    MaxMessageLength = 500,
    AllowGPS         = true,
    AllowPhotos      = true,
}

Config.Security.RateLimits.messages = 900
Config.Security.RateLimits.wavechat = 700

Exports

ExportSignaturePurpose
GetMessages(identifier, requestSource) -> table[]Returns message threads (access-checked)
GetConversation(identifier, targetNumber, requestSource) -> table[]Returns a conversation (access-checked)

Released under GPL-3.0 License