mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 07:23:53 +01:00
ircd:Ⓜ️ Add a tuple structure for m_relates_to.
This commit is contained in:
parent
25fbf51801
commit
bf2df9c223
4 changed files with 33 additions and 0 deletions
|
@ -78,6 +78,7 @@ namespace ircd
|
|||
#include "typing.h"
|
||||
#include "receipt.h"
|
||||
#include "direct_to_device.h"
|
||||
#include "relates.h"
|
||||
#include "txn.h"
|
||||
#include "hook.h"
|
||||
#include "visible.h"
|
||||
|
|
|
@ -178,4 +178,6 @@ struct ircd::m::name
|
|||
static constexpr const char *const include_state {"include_state"};
|
||||
static constexpr const char *const groupings {"groupings"};
|
||||
static constexpr const char *const filter {"filter"};
|
||||
|
||||
static constexpr const char *const rel_type {"rel_type"};
|
||||
};
|
||||
|
|
28
include/ircd/m/relates.h
Normal file
28
include/ircd/m/relates.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
// Matrix Construct
|
||||
//
|
||||
// Copyright (C) Matrix Construct Developers, Authors & Contributors
|
||||
// Copyright (C) 2016-2018 Jason Volk <jason@zemos.net>
|
||||
//
|
||||
// Permission to use, copy, modify, and/or distribute this software for any
|
||||
// purpose with or without fee is hereby granted, provided that the above
|
||||
// copyright notice and this permission notice is present in all copies. The
|
||||
// full license for this software is available in the LICENSE file.
|
||||
|
||||
#pragma once
|
||||
#define HAVE_IRCD_M_RELATES_H
|
||||
|
||||
namespace ircd::m
|
||||
{
|
||||
struct relates_to;
|
||||
}
|
||||
|
||||
struct ircd::m::relates_to
|
||||
:json::tuple
|
||||
<
|
||||
json::property<name::event_id, json::string>,
|
||||
json::property<name::rel_type, json::string>
|
||||
>
|
||||
{
|
||||
using super_type::tuple;
|
||||
using super_type::operator=;
|
||||
};
|
|
@ -157,3 +157,5 @@ constexpr const char *const ircd::m::name::event_context;
|
|||
constexpr const char *const ircd::m::name::include_state;
|
||||
constexpr const char *const ircd::m::name::groupings;
|
||||
constexpr const char *const ircd::m::name::filter;
|
||||
|
||||
constexpr const char *const ircd::m::name::rel_type;
|
||||
|
|
Loading…
Reference in a new issue