Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F7889995
account-data.cpp
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
account-data.cpp
View Options
/*
* This file is part of libkazv.
* SPDX-FileCopyrightText: 2023 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#include
<libkazv-config.hpp>
#include
"status-utils.hpp"
#include
"account-data.hpp"
namespace
Kazv
{
ClientResult
updateClient
(
ClientModel
m
,
SetAccountDataPerRoomAction
a
)
{
m
.
addJob
(
m
.
job
<
SetAccountDataPerRoomJob
>
()
.
make
(
m
.
userId
,
a
.
roomId
,
a
.
accountDataEvent
.
type
(),
a
.
accountDataEvent
.
content
()));
return
{
std
::
move
(
m
),
lager
::
noop
};
}
ClientResult
processResponse
(
ClientModel
m
,
SetAccountDataPerRoomResponse
r
)
{
if
(
!
r
.
success
())
{
return
{
std
::
move
(
m
),
failWithResponse
(
r
)
};
}
return
{
std
::
move
(
m
),
lager
::
noop
};
}
ClientResult
updateClient
(
ClientModel
m
,
SetAccountDataAction
a
)
{
m
.
addJob
(
m
.
job
<
SetAccountDataJob
>
()
.
make
(
m
.
userId
,
a
.
accountDataEvent
.
type
(),
a
.
accountDataEvent
.
content
()));
return
{
std
::
move
(
m
),
lager
::
noop
};
}
ClientResult
processResponse
(
ClientModel
m
,
SetAccountDataResponse
r
)
{
if
(
!
r
.
success
())
{
return
{
std
::
move
(
m
),
failWithResponse
(
r
)
};
}
return
{
std
::
move
(
m
),
lager
::
noop
};
}
}
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Thu, Oct 2, 2:51 AM (21 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
471656
Default Alt Text
account-data.cpp (1 KB)
Attached To
Mode
rL libkazv
Attached
Detach File
Event Timeline
Log In to Comment