jay/module/publish.h
2025-03-28 23:12:34 +02:00

25 lines
605 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 Shared::Permissions& permissions);
~Publish() noexcept;
virtual Shared::Result message(const std::shared_ptr<::Actor>& actor, const Shared::Strings& args) override;
private:
Shared::Result to(const std::string& address, const std::string& body);
};
}