Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Events.Message
SourceThe Message
module represents the content of "message"
events returned by Zulip's real-time events API.
Message flags.
See https://zulip.com/api/update-message-flags#available-flags.
Message recipients
type t = private {
id : int;
sender_id : int;
sender_email : string;
sender_full_name : string;
recipients : recipients;
content : string;
flags : flag list;
}
The type of messages.
Returns a mention (or silent mention) of the message's sender.
Returns a Messages.destination
for privately replying to the sender.
Returns the message's destination as a Messages.destination
.
Determines whether a message should be trusted.
Messages sent by users that are *either* in the trusted_ids
or trusted_emails
lists are considered as trusted.
If none of trusted_ids
and trusted_emails
is provided (or if both lists are empty), no message will be trusted.
Returns whether the message was sent by the current user.
Returns whether the message is a self-message, i.e. a message in a conversation between the current user and themselves.
Note that this is different from is_own_message
: all "selfmsg" are sent by the current user (i.e. is_own_message
is true
), but the current user can send messages in conversations involving other users (in which case is_own_message
would be true
but is_selfmsg
would be false
).
Returns whether the message is in a private conversation with exactly two users.
Note that what OZulip calls a "privmsg" here is not the same as what Zulip calls a "private" message, because Zulip's "private" message can also be group conversations with many users.
Returns whether the message is in a private *group* conversation.
Messages sent to a stream are never "groupmsg", and neither are private messages with two members or less.
val reply :
?privmsg:bool ->
?mention:bool ->
Ozulip__.Config.config ->
t ->
string ->
(int, int * string option) Lwt_result.t
Reply to a message.
val replyf :
?privmsg:bool ->
?mention:bool ->
Ozulip__.Config.config ->
t ->
('a, Format.formatter, unit, (int, int * string option) Lwt_result.t) format4 ->
'a
replyf
calls reply
with a pretty-printed string argument.
replyf conf msg "Here is a quote: %s" quote
does the same thing as reply conf msg (Format.asprintf "Here is a quote: %s" quote)
but is more convenient.