UserLand Software Home  |  Manila  |  Radio  |  Support  |  News

DocServer

Prev | Next | mainResponder Verbs > mainResponder.discuss > addMessage

mainResponder.discuss.addMessage

Syntax mainResponder.discuss.addMessage (subject, member, inResponseTo, body, flNeuterMacros, flNeuterTags, postTime, adrroot, flcallback)

Params subject is a string specifying the subject of the message.

member is a string specifying the mail address of the poster.

inResponseTo is a number. It should be 0 if the message is at the top of a new thread. Otherwise it is the number of the message that is replied to.

body is a string specifying the text of the message.

flNeuterMacros is an optional boolean indicating whether macros in the message text should be neutralized. Default: true.

flNeuterTags is an optional boolean indicating whether HTML tags in the message text should be neutralized. Default: true.

postTime is an optional date specifying when the message was posted. Default: clock.now().

adrroot is an optional address pointing to the discussion group (i.e. a top-level table in discuss.root). Default: nil.

flcallback is an optional boolean indicating whether the scripts in config.mainResponder.callbacks.addMessage should be run after the message has been added to the discussion group. Default: true.

Action Adds a new message to the specified discussion group.

Returns The number identifying the newly added message in the context of the discussion group.

Examples mainResponder.discuss.addMessage ("First message", "andre@userland.com", 0, "This is a test.")

   » 1

Errors If subject or body are empty strings, an error message is generated.

Notes This script also performs various house-keeping tasks not mentioned here.

Detailed information about mainResponder's discussion group format is available from the Frontier Site.

See Also mainResponder.discuss.openRoot

mainResponder.discuss.getMessageTable

mainResponder.discuss.deleteMessage

Prev | Next | mainResponder Verbs > mainResponder.discuss > addMessage