Respond to MAM requests on a channel JID

At the moment, result-set-management is not implemented, the whole history
(well, at most 1024 messages) is returned.
This commit is contained in:
louiz’ committed 2016-08-28 22:42:50 +02:00
1 parent b59fc2a834
commit 7536a1b3f3
11 files changed
+176 -30

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
#include <utils/time.hpp>
namespace utils
{
std::string to_string(const std::time_t& timestamp)
{
constexpr std::size_t stamp_size = 20;
char date_buf[stamp_size];
std::strftime(date_buf, stamp_size, "%FT%TZ", std::gmtime(&timestamp));
return {std::begin(date_buf), std::end(date_buf)};
}
}
+9
View File
@@ -0,0 +1,9 @@
#pragma once
#include <ctime>
#include <string>
namespace utils
{
std::string to_string(const std::time_t& timestamp);
}