Implement call ringing

This commit is contained in:
Tobias Fella
2025-06-30 23:12:35 +02:00
parent 20e30982cf
commit 0f5955ae34
10 changed files with 409 additions and 13 deletions

View File

@@ -46,8 +46,10 @@
#include "chatbarcache.h"
#include "clipboard.h"
#include "events/callnotifyevent.h"
#include "events/pollevent.h"
#include "filetransferpseudojob.h"
#include "mediamanager.h"
#include "neochatconnection.h"
#include "roomlastmessageprovider.h"
#include "spacehierarchycache.h"
@@ -117,6 +119,14 @@ NeoChatRoom::NeoChatRoom(Connection *connection, QString roomId, JoinState joinS
}
connect(this, &Room::addedMessages, this, &NeoChatRoom::cacheLastEvent);
connect(this, &NeoChatRoom::aboutToAddNewMessages, this, [this](const auto &events) {
for (const auto &event : events) {
if (event->template is<CallNotifyEvent>()) {
MediaManager::instance().ring(event->fullJson(), this);
}
}
});
connect(this, &Quotient::Room::eventsHistoryJobChanged, this, &NeoChatRoom::lastActiveTimeChanged);
connect(this, &Room::joinStateChanged, this, [this](JoinState oldState, JoinState newState) {