Implement call ringing
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user