Is it possible to get the timestamp of the message inside muc_filter_message
hook ? I need to notify the muc messages, the notification payload must include the timestamp of the messages.
muc_filter_message(#message{from = From, body = Body} = Pkt,
#state{config = Config, jid = RoomJID} = MUCState,
FromNick) ->
?INFO_MSG("~p.", [From#jid.lserver]),
PostUrl = gen_mod:get_module_opt(From#jid.lserver, ?MODULE, post_url, fun(S) -> iolist_to_binary(S) end, list_to_binary("")),
Is there a field that I can extract from Pkt
which indicates the timestamp ?
In the client side, I got this frame where archived -> id is matching with the timestamp stored in the archive table of the ejabberd database