modules/client/sync: Stub device_unused_fallback_key_types.
This commit is contained in:
parent
956aa7682f
commit
6072229dcc
|
@ -157,6 +157,7 @@ ircd::m::module_names
|
||||||
"client_sync_account_data",
|
"client_sync_account_data",
|
||||||
"client_sync_device_lists",
|
"client_sync_device_lists",
|
||||||
"client_sync_device_one_time_keys_count",
|
"client_sync_device_one_time_keys_count",
|
||||||
|
"client_sync_device_unused_fallback_key_types",
|
||||||
"client_sync_groups",
|
"client_sync_groups",
|
||||||
"client_sync_presence",
|
"client_sync_presence",
|
||||||
"client_sync_to_device",
|
"client_sync_to_device",
|
||||||
|
|
|
@ -443,6 +443,7 @@ client_client_sync_groups_la_SOURCES = client/sync/groups.cc
|
||||||
client_client_sync_to_device_la_SOURCES = client/sync/to_device.cc
|
client_client_sync_to_device_la_SOURCES = client/sync/to_device.cc
|
||||||
client_client_sync_device_lists_la_SOURCES = client/sync/device_lists.cc
|
client_client_sync_device_lists_la_SOURCES = client/sync/device_lists.cc
|
||||||
client_client_sync_device_one_time_keys_count_la_SOURCES = client/sync/device_one_time_keys_count.cc
|
client_client_sync_device_one_time_keys_count_la_SOURCES = client/sync/device_one_time_keys_count.cc
|
||||||
|
client_client_sync_device_unused_fallback_key_types_la_SOURCES = client/sync/device_unused_fallback_key_types.cc
|
||||||
|
|
||||||
client_module_LTLIBRARIES += \
|
client_module_LTLIBRARIES += \
|
||||||
client/client_sync_account_data.la \
|
client/client_sync_account_data.la \
|
||||||
|
@ -452,6 +453,7 @@ client_module_LTLIBRARIES += \
|
||||||
client/client_sync_to_device.la \
|
client/client_sync_to_device.la \
|
||||||
client/client_sync_device_lists.la \
|
client/client_sync_device_lists.la \
|
||||||
client/client_sync_device_one_time_keys_count.la \
|
client/client_sync_device_one_time_keys_count.la \
|
||||||
|
client/client_sync_device_unused_fallback_key_types.la \
|
||||||
###
|
###
|
||||||
|
|
||||||
# client/sync/rooms/
|
# client/sync/rooms/
|
||||||
|
|
|
@ -0,0 +1,64 @@
|
||||||
|
// Matrix Construct
|
||||||
|
//
|
||||||
|
// Copyright (C) Matrix Construct Developers, Authors & Contributors
|
||||||
|
// Copyright (C) 2016-2023 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.
|
||||||
|
|
||||||
|
namespace ircd::m::sync
|
||||||
|
{
|
||||||
|
static bool device_unused_fallback_key_types_polylog(data &);
|
||||||
|
static bool device_unused_fallback_key_types_linear(data &);
|
||||||
|
|
||||||
|
extern item device_unused_fallback_key_types;
|
||||||
|
}
|
||||||
|
|
||||||
|
ircd::mapi::header
|
||||||
|
IRCD_MODULE
|
||||||
|
{
|
||||||
|
"Client Sync :Device Unused Fallback Key Types"
|
||||||
|
};
|
||||||
|
|
||||||
|
decltype(ircd::m::sync::device_unused_fallback_key_types)
|
||||||
|
ircd::m::sync::device_unused_fallback_key_types
|
||||||
|
{
|
||||||
|
"device_unused_fallback_key_types",
|
||||||
|
device_unused_fallback_key_types_polylog,
|
||||||
|
device_unused_fallback_key_types_linear
|
||||||
|
};
|
||||||
|
|
||||||
|
bool
|
||||||
|
ircd::m::sync::device_unused_fallback_key_types_linear(data &data)
|
||||||
|
{
|
||||||
|
if(!data.device_id)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if(!data.event || !data.event->event_id)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if(!startswith(json::get<"type"_>(*data.event), "ircd.device"))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if(json::get<"room_id"_>(*data.event) != data.user_room)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
json::stack::array array
|
||||||
|
{
|
||||||
|
*data.out, "device_unused_fallback_key_types"
|
||||||
|
};
|
||||||
|
|
||||||
|
array.append("signed_curve25519");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
ircd::m::sync::device_unused_fallback_key_types_polylog(data &data)
|
||||||
|
{
|
||||||
|
if(!data.device_id)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
Loading…
Reference in New Issue