Module api

Module api 

Source
Expand description

This module defines the HTTP API endpoints for the web user interface.

Structs§

AddFriendRequest
Request structure for adding a new friend.
ConversationResponse
Response structure for a conversation summary.
FriendResponse
Response structure for a friend.
GetMessagesQuery
Query parameters for fetching messages.
IdentityResponse
Response structure for the user’s identity.
MessageResponse
Response structure for a message.
SendMessageRequest
Request structure for sending a new message.
SystemStatus
Response structure for system status.

Enums§

MessageQueryMode 🔒
Defines the mode for querying messages.

Functions§

add_friend
Adds a new friend to the user’s friend list.
decrypt_message_content 🔒
Helper function to decrypt message content for web API responses.
default_limit 🔒
Default limit for message queries.
get_me
Retrieves the user’s identity information.
get_messages
Retrieves messages for a specific conversation.
get_online_peers
Retrieves a list of currently online peers.
get_system_status
Retrieves the current system status.
list_conversations
Lists all conversations, including the last message and online status of friends.
list_friends
Lists all friends of the user.
mark_message_read
Marks a specific message as read.
send_message
Sends a message to a specific peer.