Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Konheko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
Konheko
Commits
b1c74490
Verified
Commit
b1c74490
authored
3 years ago
by
Nicolas Werner
Browse files
Options
Downloads
Patches
Plain Diff
Bump mtxclient version
parent
7c17f3d0
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
meson.build
+2
-2
2 additions, 2 deletions
meson.build
requirements.txt
+2
-3
2 additions, 3 deletions
requirements.txt
src/models/roommodel.cpp
+8
-5
8 additions, 5 deletions
src/models/roommodel.cpp
src/sync.cpp
+1
-1
1 addition, 1 deletion
src/sync.cpp
with
13 additions
and
11 deletions
meson.build
+
2
−
2
View file @
b1c74490
...
...
@@ -18,9 +18,9 @@ boost_dep = dependency('boost', modules : [
],
static
:
true
,
include_type
:
'system'
)
zlib_dep
=
dependency
(
'zlib'
)
olm_dep
=
dependency
(
'Olm'
,
method
:
'cmake'
,
cmake_module_path
:
cmake_pref
+
'/Olm'
,
static
:
true
,
include_type
:
'system'
)
matrix_dep
=
dependency
(
'MatrixClient'
,
method
:
'cmake'
,
cmake_module_path
:
cmake_pref
+
'/MatrixClient'
,
static
:
true
)
matrix_dep
=
dependency
(
'MatrixClient'
,
method
:
'cmake'
,
cmake_module_path
:
cmake_pref
+
'/MatrixClient'
,
static
:
true
,
version
:
'>=0.5.1'
)
json_dep
=
dependency
(
'nlohmann_json'
,
method
:
'cmake'
,
modules
:
[
'nlohmann_json::nlohmann_json'
],
cmake_module_path
:
cmake_pref
+
'/nlohmann_json'
,
static
:
true
)
ssl_dep
=
dependency
(
'OpenSSL'
,
static
:
true
)
ssl_dep
=
dependency
(
'OpenSSL'
,
static
:
true
,
version
:
'>=1.1.0'
)
sailfish_dep
=
dependency
(
'sailfishapp'
)
#networkstate_dep = dependency('statefs-qt5')
#networkstate_dep = dependency('contextkit-statefs')
...
...
This diff is collapsed.
Click to expand it.
requirements.txt
+
2
−
3
View file @
b1c74490
nlohmann/json
https://github.com/jedisct1/libsodium/releases/download/1.0.17/libsodium-1.0.17.tar.gz
--cmake autotools
https://gitlab.matrix.org/matrix-org/olm/-/archive/3.1.0/olm-3.1.0.zip
-DBUILD_SHARED_LIBS=OFF
https://gitlab.matrix.org/matrix-org/olm/-/archive/3.2.1/olm-3.2.1.zip
-DBUILD_SHARED_LIBS=OFF
gabime/spdlog
-DSPDLOG_BUILD_BENCH
=OFF
-DSPDLOG_BUILD_EXAMPLES
=OFF
-DSPDLOG_BUILD_TESTS
=OFF
boost,https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.bz2
--cmake
boost
-DBUILD_SHARED_LIBS
=OFF
-DBOOST_WITH_IOSTREAMS
=1
-DBOOST_WITH_SYSTEM
=1
-DBOOST_WITH_THREAD
=1
-DBOOST_WITH_HEADERS
=1
Nheko-Reborn/mtxclient@
6475b80e0e9bb34c1271477f594ed3cb29a5f883
-DBUILD_LIB_EXAMPLES
=off
-DBUILD_LIB_TESTS
=OFF
-DBUILD_SHARED_LIBS
=OFF
-DBoost_USE_STATIC_LIBS
=ON
Nheko-Reborn/mtxclient@
v0.5.1
-DBUILD_LIB_EXAMPLES
=off
-DBUILD_LIB_TESTS
=OFF
-DBUILD_SHARED_LIBS
=OFF
-DBoost_USE_STATIC_LIBS
=ON
This diff is collapsed.
Click to expand it.
src/models/roommodel.cpp
+
8
−
5
View file @
b1c74490
...
...
@@ -47,6 +47,9 @@ template <class T> std::string eventBody(const Event<T> &) { return ""; }
template
<
class
T
>
auto
eventBody
(
const
mtx
::
events
::
RoomEvent
<
T
>
&
e
)
->
decltype
(
e
.
content
.
body
)
{
return
e
.
content
.
body
;
}
std
::
string
eventBody
(
const
mtx
::
events
::
RoomEvent
<
mtx
::
events
::
msg
::
KeyVerificationRequest
>
&
e
)
{
return
e
.
content
.
body
.
value_or
(
""
);
}
template
<
class
T
>
uint64_t
eventHeight
(
const
Event
<
T
>
&
)
{
return
-
1
;
}
template
<
class
T
>
auto
eventHeight
(
const
mtx
::
events
::
RoomEvent
<
T
>
&
e
)
->
decltype
(
e
.
content
.
info
.
h
)
{
...
...
@@ -530,7 +533,7 @@ void Room::sendTextMessage(QString message) {
mtx
::
events
::
msg
::
Text
text
;
text
.
body
=
message
.
trimmed
().
toStdString
();
http
::
client
().
send_room_message
<
msg
::
Text
,
EventType
::
RoomMessage
>
(
http
::
client
().
send_room_message
(
this
->
id
,
http
::
client
().
generate_txn_id
(),
text
,
[
this
](
const
mtx
::
responses
::
EventId
&
res
,
mtx
::
http
::
RequestErr
err
)
{
if
(
err
)
{
...
...
@@ -572,7 +575,7 @@ void Room::sendImages(QList<QUrl> images, QList<QString> mimetypes) {
img
.
info
.
w
=
size
.
width
();
img
.
info
.
size
=
filesize
;
http
::
client
().
send_room_message
<
msg
::
Image
,
mtx
::
events
::
EventType
::
RoomMessage
>
(
http
::
client
().
send_room_message
(
this
->
id
,
http
::
client
().
generate_txn_id
(),
img
,
[
this
](
const
mtx
::
responses
::
EventId
&
res
,
mtx
::
http
::
RequestErr
err
)
{
if
(
err
)
{
...
...
@@ -625,7 +628,7 @@ void Room::sendAudio(QList<QUrl> files, QList<QString> mimetypes) {
auto
audio2
=
audio
;
audio2
.
url
=
uri
.
content_uri
;
http
::
client
().
send_room_message
<
msg
::
Audio
,
mtx
::
events
::
EventType
::
RoomMessage
>
(
http
::
client
().
send_room_message
(
this
->
id
,
http
::
client
().
generate_txn_id
(),
audio2
,
[
this
](
const
mtx
::
responses
::
EventId
&
res
,
mtx
::
http
::
RequestErr
err
)
{
if
(
err
)
{
...
...
@@ -684,7 +687,7 @@ void Room::sendVideos(QList<QUrl> files, QList<QString> mimetypes) {
auto
video2
=
video
;
video2
.
url
=
uri
.
content_uri
;
http
::
client
().
send_room_message
<
msg
::
Video
,
mtx
::
events
::
EventType
::
RoomMessage
>
(
http
::
client
().
send_room_message
(
this
->
id
,
http
::
client
().
generate_txn_id
(),
video2
,
[
this
](
const
mtx
::
responses
::
EventId
&
res
,
mtx
::
http
::
RequestErr
err
)
{
if
(
err
)
{
...
...
@@ -733,7 +736,7 @@ void Room::sendFiles(QList<QUrl> files, QList<QString> mimetypes) {
auto
file
=
fileEv
;
file
.
url
=
uri
.
content_uri
;
http
::
client
().
send_room_message
<
msg
::
File
,
mtx
::
events
::
EventType
::
RoomMessage
>
(
http
::
client
().
send_room_message
(
this
->
id
,
http
::
client
().
generate_txn_id
(),
file
,
[
this
](
const
mtx
::
responses
::
EventId
&
res
,
mtx
::
http
::
RequestErr
err
)
{
if
(
err
)
{
...
...
This diff is collapsed.
Click to expand it.
src/sync.cpp
+
1
−
1
View file @
b1c74490
...
...
@@ -155,7 +155,7 @@ void Sync::sync() {
qDebug
()
<<
QString
::
fromStdString
(
room
->
id
);
for
(
const
auto
&
e
:
r
.
account_data
.
events
)
{
if
(
const
auto
t
=
std
::
get_if
<
mtx
::
events
::
Event
<
mtx
::
events
::
account_data
::
Tags
>>
(
&
e
))
{
if
(
const
auto
t
=
std
::
get_if
<
mtx
::
events
::
AccountData
Event
<
mtx
::
events
::
account_data
::
Tags
>>
(
&
e
))
{
qDebug
()
<<
"Tag event"
;
std
::
vector
<
std
::
string
>
tags
;
for
(
const
auto
&
tag
:
t
->
content
.
tags
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment