Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F116391
matrix-room-member.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
matrix-room-member.cpp
View Options
/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2020-2023 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#include
<libkazv-config.hpp>
#include
<cursorutil.hpp>
#include
"matrix-room-member.hpp"
#include
"helper.hpp"
#include
"matrix-event.hpp"
using
namespace
Kazv
;
using
namespace
std
::
literals
::
string_literals
;
MatrixRoomMember
::
MatrixRoomMember
(
lager
::
reader
<
Kazv
::
Event
>
memberEvent
,
QObject
*
parent
)
:
QObject
(
parent
)
,
m_memberEvent
(
memberEvent
)
,
LAGER_QT
(
membership
)(
m_memberEvent
.
xform
(
eventContent
|
jsonAtOr
(
"membership"
s
,
""
s
)
|
strToQt
))
,
LAGER_QT
(
userId
)(
m_memberEvent
.
xform
(
zug
::
map
([](
Event
e
)
{
return
e
.
stateKey
();
})
|
strToQt
))
,
LAGER_QT
(
name
)(
m_memberEvent
.
xform
(
eventContent
|
jsonAtOr
(
"displayname"
s
,
""
s
)
|
strToQt
))
,
LAGER_QT
(
avatarMxcUri
)(
m_memberEvent
.
xform
(
roomMemberToAvatar
|
strToQt
))
{
}
MatrixRoomMember
::~
MatrixRoomMember
()
=
default
;
MatrixEvent
*
MatrixRoomMember::toEvent
()
const
{
return
new
MatrixEvent
(
m_memberEvent
);
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sun, Dec 1, 11:54 AM (1 d, 12 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41675
Default Alt Text
matrix-room-member.cpp (1 KB)
Attached To
Mode
rK kazv
Attached
Detach File
Event Timeline
Log In to Comment