Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F140025
push-rules-desc-p.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
push-rules-desc-p.hpp
View Options
/*
* This file is part of libkazv.
* SPDX-FileCopyrightText: 2020-2023 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
#include
<libkazv-config.hpp>
#include
<optional>
#include
<event.hpp>
#include
"push-rules-desc.hpp"
namespace
Kazv
{
std
::
vector
<
std
::
string
>
splitPath
(
std
::
string
path
);
bool
matchGlob
(
std
::
string
target
,
std
::
string
pattern
);
std
::
pair
<
bool
,
json
>
validateRule
(
std
::
string
ruleSetName
,
const
json
&
rule
);
Event
validatePushRules
(
const
Event
&
e
);
struct
PushRulesDescPrivate
{
PushRulesDescPrivate
(
const
Event
&
e
);
Event
pushRulesEvent
;
std
::
optional
<
std
::
pair
<
std
::
string
,
json
>>
matchRule
(
const
Event
&
e
,
const
RoomModel
&
room
)
const
;
std
::
optional
<
std
::
pair
<
std
::
string
,
json
>>
matchRuleSet
(
std
::
string
ruleSetName
,
const
Event
&
e
,
const
RoomModel
&
room
)
const
;
bool
matchP
(
std
::
string
ruleSetName
,
const
json
&
rule
,
const
Event
&
e
,
const
RoomModel
&
room
)
const
;
PushAction
handleRule
(
std
::
string
ruleSetName
,
const
json
&
rule
,
const
Event
&
e
,
const
RoomModel
&
room
)
const
;
};
}
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Jan 19, 10:24 AM (3 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
55103
Default Alt Text
push-rules-desc-p.hpp (1 KB)
Attached To
Mode
rL libkazv
Attached
Detach File
Event Timeline
Log In to Comment