jay/module/publish.h

25 lines
607 B
C++

// SPDX-FileCopyrightText: 2024 Yury Gubich <blue@macaw.me>
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include "shared/definitions.h"
#include "shared/result.h"
#include "shared/utils.h"
#include "module.h"
namespace Module {
class Publish : public Module {
public:
Publish(const std::shared_ptr<Core>& core, const Config::Module& conf);
~Publish() noexcept;
virtual Shared::Result message(const std::shared_ptr<::Actor>& actor, std::string_view view) override;
private:
Shared::Result to(std::string_view address, std::string_view title, std::string_view body);
};
}