MessageData
The central data repository for all user posts data
Table of Contents
Events
logNewMsg
This event is triggered when a new message is posted. It logs the details of the message.
logRemoveMsg
This event is triggered when a message is removed. It logs the ID of the message that was removed.
logUpdateMsgStats
This event is triggered when the statistics of a message are updated. It logs the type of statistic, message ID, the updated value of the statistic, and tips.
Public Function
getPoster
This function returns the address of the user or group that posted a specific message.
Inputs
msgID
uint256
The ID of the message to check for the poster's address
1
Outputs
address
The address of the member that posted the message
Example
Using ethers.js to call the getPoster
function:
getInGroups
This function returns a list of group IDs in which a specific message was posted.
Inputs
msgID
uint256
The ID of the message to check for
1
Outputs
uint256[]
An array of group IDs that the message was posted in
Example
Using ethers.js to call the getInGroups
function:
getMsgCommentLevel
This function returns the comment level of a post. If the return value is 0, comments are open. If the return value is 1, comments are closed.
Inputs
msgID
uint256
The ID of the message to check for
1
Outputs
uint256
The comment level of the message
Example
Using ethers.js to call the getMsgCommentLevel
function:
Last updated