0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-29 00:03:45 +02:00

ircd:Ⓜ️ Add m.direct_to_device edu schema / header.

This commit is contained in:
Jason Volk 2019-02-18 12:23:40 -08:00
parent dd99d929aa
commit bc0e12e31b
5 changed files with 44 additions and 0 deletions

View file

@ -0,0 +1,36 @@
// 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_DIRECT_TO_DEVICE_H
namespace ircd::m
{
struct direct_to_device;
}
struct ircd::m::edu::m_direct_to_device
:json::tuple
<
json::property<name::sender, json::string>,
json::property<name::type, json::string>,
json::property<name::message_id, json::string>,
json::property<name::messages, json::object>
>
{
using super_type::tuple;
using super_type::operator=;
};
struct ircd::m::direct_to_device
:edu::m_direct_to_device
{
using edu::m_direct_to_device::m_direct_to_device;
};

View file

@ -26,6 +26,7 @@ struct ircd::m::edu
struct m_presence;
struct m_typing;
struct m_receipt;
struct m_direct_to_device;
using super_type::tuple;
using super_type::operator=;

View file

@ -55,6 +55,7 @@ namespace ircd::m::vm
#include "presence.h"
#include "typing.h"
#include "receipt.h"
#include "direct_to_device.h"
#include "txn.h"
#include "hook.h"
#include "visible.h"

View file

@ -156,4 +156,7 @@ struct ircd::m::name
static constexpr const char *const keys {"keys"};
static constexpr const char *const device_display_name {"device_display_name"};
static constexpr const char *const algorithms {"algorithms"};
static constexpr const char *const message_id {"message_id"};
static constexpr const char *const messages {"messages"};
};

View file

@ -135,3 +135,6 @@ constexpr const char *const ircd::m::name::last_seen_ts;
constexpr const char *const ircd::m::name::keys;
constexpr const char *const ircd::m::name::device_display_name;
constexpr const char *const ircd::m::name::algorithms;
constexpr const char *const ircd::m::name::message_id;
constexpr const char *const ircd::m::name::messages;