Skip to content

Commit

Permalink
work
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasFella committed Oct 12, 2024
1 parent e58943f commit bb4c1aa
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 18 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ target_sources(${QUOTIENT_LIB_NAME} PUBLIC FILE_SET HEADERS BASE_DIRS .
Quotient/jobs/mediathumbnailjob.h
Quotient/jobs/downloadfilejob.h
Quotient/keyverificationsession.h
Quotient/e2ee/e2ee_common.h
Quotient/events/keyverificationevent.h
Quotient/keyimport.h
Quotient/qt_connection_util.h
Expand Down Expand Up @@ -215,7 +214,6 @@ target_sources(${QUOTIENT_LIB_NAME} PUBLIC FILE_SET HEADERS BASE_DIRS .
Quotient/jobs/mediathumbnailjob.cpp
Quotient/jobs/downloadfilejob.cpp
Quotient/keyverificationsession.cpp
Quotient/e2ee/e2ee_common.cpp
Quotient/keyimport.cpp
libquotientemojis.qrc
)
Expand Down
4 changes: 2 additions & 2 deletions Quotient/csapi/keys.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#include <Quotient/csapi/definitions/cross_signing_key.h>
#include <Quotient/csapi/definitions/device_keys.h>

#include <Quotient/e2ee/e2ee_common.h>

#include <Quotient/jobs/basejob.h>

using OneTimeKeys = QHash<QString, std::variant<QString, SignedOneTimeKey>>;

namespace Quotient {

//! \brief Upload end-to-end encryption keys.
Expand Down
1 change: 0 additions & 1 deletion Quotient/events/encryptedevent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: LGPL-2.1-or-later

#include "encryptedevent.h"
#include <Quotient/e2ee/e2ee_common.h>

using namespace Quotient;

Expand Down
2 changes: 0 additions & 2 deletions Quotient/events/encryptionevent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

#include "../logging_categories_p.h"

#include "../e2ee/e2ee_common.h"

using namespace Quotient;

static constexpr std::array encryptionStrings { MegolmV1AesSha2AlgoKey };
Expand Down
1 change: 0 additions & 1 deletion Quotient/events/filesourceinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include "filesourceinfo.h"

#include "../e2ee/e2ee_common.h"
#include "../logging_categories_p.h"
#include "../util.h"

Expand Down
16 changes: 7 additions & 9 deletions Quotient/room.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
#include "csapi/rooms.h"
#include "csapi/tags.h"

#include "e2ee/e2ee_common.h"

#include "events/callevents.h"
#include "events/encryptionevent.h"
#include "events/event.h"
Expand Down Expand Up @@ -1400,13 +1398,13 @@ int Room::powerLevelFor(const QString& eventTypeId, bool forceStateEvent) const

RoomEventPtr Room::decryptMessage(const EncryptedEvent& encryptedEvent)
{
if (const auto algorithm = encryptedEvent.algorithm();
!isSupportedAlgorithm(algorithm)) //
{
qWarning(E2EE) << "Algorithm" << algorithm << "of encrypted event"
<< encryptedEvent.id() << "is not supported";
return {};
}
// if (const auto algorithm = encryptedEvent.algorithm();
// !isSupportedAlgorithm(algorithm)) //
// {
// qWarning(E2EE) << "Algorithm" << algorithm << "of encrypted event"
// << encryptedEvent.id() << "is not supported";
// return {};
// }

auto decrypted = connection()->decryptRoomEvent(this, QJsonDocument(encryptedEvent.fullJson()).toJson());
// QString decrypted = d->groupSessionDecryptMessage(
Expand Down
1 change: 0 additions & 1 deletion gtad/gtad.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ analyzer:
# - getFilter<: *Filter
- OneTimeKeys:
type: OneTimeKeys
imports: '<Quotient/e2ee/e2ee_common.h>'
- /(Room|Event|RoomEvent)Filter$/: # These do not need std::optional<>
- //: *UseOptional
- array:
Expand Down

0 comments on commit bb4c1aa

Please sign in to comment.