mirror of
https://github.com/matrix-construct/construct
synced 2025-03-14 05:20:17 +01:00
modules/client/rooms: Stub the remaining room operation endpoints.
This commit is contained in:
parent
bae8e3b869
commit
083397c03d
9 changed files with 228 additions and 0 deletions
|
@ -128,6 +128,12 @@ client_client_rooms_la_SOURCES = \
|
|||
client/rooms/redact.cc \
|
||||
client/rooms/receipt.cc \
|
||||
client/rooms/join.cc \
|
||||
client/rooms/invite.cc \
|
||||
client/rooms/leave.cc \
|
||||
client/rooms/forget.cc \
|
||||
client/rooms/kick.cc \
|
||||
client/rooms/ban.cc \
|
||||
client/rooms/unban.cc \
|
||||
client/rooms/read_markers.cc \
|
||||
client/rooms/rooms.cc \
|
||||
###
|
||||
|
|
24
modules/client/rooms/ban.cc
Normal file
24
modules/client/rooms/ban.cc
Normal file
|
@ -0,0 +1,24 @@
|
|||
// 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.
|
||||
|
||||
#include "rooms.h"
|
||||
|
||||
using namespace ircd;
|
||||
|
||||
resource::response
|
||||
post__ban(client &client,
|
||||
const resource::request &request,
|
||||
const m::room::id &room_id)
|
||||
{
|
||||
return resource::response
|
||||
{
|
||||
client, http::OK
|
||||
};
|
||||
}
|
24
modules/client/rooms/forget.cc
Normal file
24
modules/client/rooms/forget.cc
Normal file
|
@ -0,0 +1,24 @@
|
|||
// 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.
|
||||
|
||||
#include "rooms.h"
|
||||
|
||||
using namespace ircd;
|
||||
|
||||
resource::response
|
||||
post__forget(client &client,
|
||||
const resource::request &request,
|
||||
const m::room::id &room_id)
|
||||
{
|
||||
return resource::response
|
||||
{
|
||||
client, http::OK
|
||||
};
|
||||
}
|
24
modules/client/rooms/invite.cc
Normal file
24
modules/client/rooms/invite.cc
Normal file
|
@ -0,0 +1,24 @@
|
|||
// 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.
|
||||
|
||||
#include "rooms.h"
|
||||
|
||||
using namespace ircd;
|
||||
|
||||
resource::response
|
||||
post__invite(client &client,
|
||||
const resource::request &request,
|
||||
const m::room::id &room_id)
|
||||
{
|
||||
return resource::response
|
||||
{
|
||||
client, http::OK
|
||||
};
|
||||
}
|
24
modules/client/rooms/kick.cc
Normal file
24
modules/client/rooms/kick.cc
Normal file
|
@ -0,0 +1,24 @@
|
|||
// 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.
|
||||
|
||||
#include "rooms.h"
|
||||
|
||||
using namespace ircd;
|
||||
|
||||
resource::response
|
||||
post__kick(client &client,
|
||||
const resource::request &request,
|
||||
const m::room::id &room_id)
|
||||
{
|
||||
return resource::response
|
||||
{
|
||||
client, http::OK
|
||||
};
|
||||
}
|
24
modules/client/rooms/leave.cc
Normal file
24
modules/client/rooms/leave.cc
Normal file
|
@ -0,0 +1,24 @@
|
|||
// 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.
|
||||
|
||||
#include "rooms.h"
|
||||
|
||||
using namespace ircd;
|
||||
|
||||
resource::response
|
||||
post__leave(client &client,
|
||||
const resource::request &request,
|
||||
const m::room::id &room_id)
|
||||
{
|
||||
return resource::response
|
||||
{
|
||||
client, http::OK
|
||||
};
|
||||
}
|
|
@ -149,6 +149,24 @@ post_rooms(client &client,
|
|||
if(cmd == "join")
|
||||
return post__join(client, request, room_id);
|
||||
|
||||
if(cmd == "invite")
|
||||
return post__invite(client, request, room_id);
|
||||
|
||||
if(cmd == "leave")
|
||||
return post__leave(client, request, room_id);
|
||||
|
||||
if(cmd == "forget")
|
||||
return post__forget(client, request, room_id);
|
||||
|
||||
if(cmd == "kick")
|
||||
return post__kick(client, request, room_id);
|
||||
|
||||
if(cmd == "ban")
|
||||
return post__ban(client, request, room_id);
|
||||
|
||||
if(cmd == "unban")
|
||||
return post__unban(client, request, room_id);
|
||||
|
||||
if(cmd == "redact")
|
||||
return post__redact(client, request, room_id);
|
||||
|
||||
|
|
|
@ -115,6 +115,66 @@ post__join(ircd::client &,
|
|||
const ircd::resource::request &,
|
||||
const ircd::m::room::id &);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// invite.cc
|
||||
//
|
||||
|
||||
ircd::resource::response
|
||||
post__invite(ircd::client &,
|
||||
const ircd::resource::request &,
|
||||
const ircd::m::room::id &);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// leave.cc
|
||||
//
|
||||
|
||||
ircd::resource::response
|
||||
post__leave(ircd::client &,
|
||||
const ircd::resource::request &,
|
||||
const ircd::m::room::id &);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// forget.cc
|
||||
//
|
||||
|
||||
ircd::resource::response
|
||||
post__forget(ircd::client &,
|
||||
const ircd::resource::request &,
|
||||
const ircd::m::room::id &);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// kick.cc
|
||||
//
|
||||
|
||||
ircd::resource::response
|
||||
post__kick(ircd::client &,
|
||||
const ircd::resource::request &,
|
||||
const ircd::m::room::id &);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// ban.cc
|
||||
//
|
||||
|
||||
ircd::resource::response
|
||||
post__ban(ircd::client &,
|
||||
const ircd::resource::request &,
|
||||
const ircd::m::room::id &);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// unban.cc
|
||||
//
|
||||
|
||||
ircd::resource::response
|
||||
post__unban(ircd::client &,
|
||||
const ircd::resource::request &,
|
||||
const ircd::m::room::id &);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// read_markers.cc
|
||||
|
|
24
modules/client/rooms/unban.cc
Normal file
24
modules/client/rooms/unban.cc
Normal file
|
@ -0,0 +1,24 @@
|
|||
// 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.
|
||||
|
||||
#include "rooms.h"
|
||||
|
||||
using namespace ircd;
|
||||
|
||||
resource::response
|
||||
post__unban(client &client,
|
||||
const resource::request &request,
|
||||
const m::room::id &room_id)
|
||||
{
|
||||
return resource::response
|
||||
{
|
||||
client, http::OK
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue