Skip to content
Snippets Groups Projects
Select Git revision
  • a84561f0dd9b9fc26fa814939125920cea7840b7
  • master default protected
  • test-ci
  • cat-fix-ssss
  • reportContent
  • effects_overhaul
  • ducktyping2
  • ducktyping
  • confetti
  • pushrules
  • cpp20
  • run-ci
  • fallbackkeys
  • sy-up
  • create-room-improv
  • v0.6.x
  • shhh
  • summaries
  • release-staging
  • update-synapse
  • fix-docs
  • v0.10.1
  • v0.10.0
  • v0.9.2
  • v0.9.1
  • v0.9.0
  • v0.8.2
  • v0.8.1
  • v0.8.0
  • v0.7.0
  • v0.6.2
  • v0.6.1
  • v0.6.0
  • v0.5.1
  • v0.5.0
  • v0.4.1
  • v0.4.0
  • v0.3.1
  • v0.3.0
  • v0.3.0-rc1
  • v0.2.1
41 results

notice.hpp

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    notice.hpp 877 B
    #pragma once
    
    /// @file
    /// @brief A bot generated message and other notices.
    
    #if __has_include(<nlohmann/json_fwd.hpp>)
    #include <nlohmann/json_fwd.hpp>
    #else
    #include <nlohmann/json.hpp>
    #endif
    
    #include <string>
    
    #include "mtx/events/common.hpp"
    
    namespace mtx {
    namespace events {
    namespace msg {
    
    //! Content of `m.room.message` with msgtype `m.notice`.
    struct Notice
    {
        //! The notice text to send.
        std::string body;
        //! Must be 'm.notice'.
        std::string msgtype;
        //! We only handle org.matrix.custom.html.
        std::string format;
        //! HTML formatted message.
        std::string formatted_body;
        //! Relates to for rich replies
        mtx::common::Relations relations;
    };
    
    void
    from_json(const nlohmann::json &obj, Notice &content);
    
    void
    to_json(nlohmann::json &obj, const Notice &content);
    
    } // namespace msg
    } // namespace events
    } // namespace mtx