0
0
Fork 0
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:
Jason Volk 2018-02-21 15:22:04 -08:00
parent bae8e3b869
commit 083397c03d
9 changed files with 228 additions and 0 deletions

View file

@ -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 \
###

View 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
};
}

View 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
};
}

View 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
};
}

View 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
};
}

View 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
};
}

View file

@ -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);

View file

@ -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

View 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
};
}