Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1037553
redaction.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
redaction.hpp
View Options
/******************************************************************************
* THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
*/
#pragma once
#include
"basejob.hpp"
namespace
Kazv
{
/*! \brief Strips all non-integrity-critical information out of an event.
*
* Strips all information out of an event which isn't critical to the
* integrity of the server-side representation of the room.
*
* This cannot be undone.
*
* Users may redact their own events, and any user with a power level
* greater than or equal to the ``redact`` power level of the room may
* redact events there.
*/
class
RedactEventJob
:
public
BaseJob
{
public
:
class
JobResponse
:
public
Response
{
public
:
JobResponse
(
Response
r
);
bool
success
()
const
;
// Result properties
/// A unique identifier for the event.
std
::
optional
<
std
::
string
>
eventId
()
const
;
};
static
constexpr
auto
needsAuth
()
{
return
true
;
}
// Construction/destruction
/*! \brief Strips all non-integrity-critical information out of an event.
*
* \param roomId
* The room from which to redact the event.
*
* \param eventId
* The ID of the event to redact
*
* \param txnId
* The transaction ID for this event. Clients should generate a
* unique ID; it will be used by the server to ensure idempotency of requests.
*
* \param reason
* The reason for the event being redacted.
*/
explicit
RedactEventJob
(
std
::
string
serverUrl
,
std
::
string
_accessToken
,
std
::
string
roomId
,
std
::
string
eventId
,
std
::
string
txnId
,
std
::
optional
<
std
::
string
>
reason
=
std
::
nullopt
);
static
BaseJob
::
Query
buildQuery
(
);
static
BaseJob
::
Body
buildBody
(
std
::
string
roomId
,
std
::
string
eventId
,
std
::
string
txnId
,
std
::
optional
<
std
::
string
>
reason
);
RedactEventJob
withData
(
JsonWrap
j
)
&&
;
RedactEventJob
withData
(
JsonWrap
j
)
const
&
;
};
using
RedactEventResponse
=
RedactEventJob
::
JobResponse
;
}
namespace
nlohmann
{
using
namespace
Kazv
;
}
namespace
Kazv
{
}
// namespace Kazv
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Wed, May 14, 7:27 AM (1 d, 15 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
156583
Default Alt Text
redaction.hpp (2 KB)
Attached To
Mode
rL libkazv
Attached
Detach File
Event Timeline
Log In to Comment