Ejabberd - Run SQL Query for Custom Command
问题 I'm trying to make a custom command in mod_admin_extra.erl . to fetch messages between 2 JIDs. My command will look like this:- ejabberdctl get_messages HOST FROM TO START_TIME END_TIME The SQL query will be like:- select * from archive where (username = FROM and bare_peer = TO) OR (username=TO and bare_peer = FROM) where created_at BETWEEN START_TIME AND END_TIME; I went through this thread to understand how IQ query works and want to build a similar sort of a thing via the command and API.