diff --git a/resources/qml/emoji/StickerPicker.qml b/resources/qml/emoji/StickerPicker.qml index 86eca4f5..4dab7e1c 100644 --- a/resources/qml/emoji/StickerPicker.qml +++ b/resources/qml/emoji/StickerPicker.qml @@ -183,7 +183,7 @@ Menu { height: stickerDim horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter - font.family: Settings.emojiFont != "" ? Settings.emojiFont : undefined + /* font.family: Settings.emojiFont != "" ? Settings.emojiFont : undefined */ font.pixelSize: 36 text: del.modelData.unicode.replace('\ufe0f', '') } diff --git a/resources/qml/voip/ActiveCallBar.qml b/resources/qml/voip/ActiveCallBar.qml index 3b5e2464..975aafad 100644 --- a/resources/qml/voip/ActiveCallBar.qml +++ b/resources/qml/voip/ActiveCallBar.qml @@ -218,7 +218,7 @@ Rectangle { Layout.preferredWidth: 24 Layout.preferredHeight: 24 buttonTextColor: "#000000" - image: CallManager.isMicMuted ? ":/icons/icons/ui/microphone-unmute.svg" : ":/icons/icons/ui/microphone-mute.svg" + image: CallManager.isMicMuted ? ":/icons/icons/ui/microphone-mute.svg" : ":/icons/icons/ui/microphone-unmute.svg" hoverEnabled: true ToolTip.visible: hovered ToolTip.text: CallManager.isMicMuted ? qsTr("Unmute Mic") : qsTr("Mute Mic") diff --git a/resources/qml/voip/PlaceCall.qml b/resources/qml/voip/PlaceCall.qml index c0724828..d3c76c82 100644 --- a/resources/qml/voip/PlaceCall.qml +++ b/resources/qml/voip/PlaceCall.qml @@ -36,7 +36,7 @@ Popup { Layout.leftMargin: 8 Label { - text: qsTr("Place a call to %1?").arg(room.roomName) + text: qsTr("Place a call in %1?").arg(room.roomName) color: palette.windowText } diff --git a/src/voip/CallManager.cpp b/src/voip/CallManager.cpp index 1ccb7096..f7d1d72e 100644 --- a/src/voip/CallManager.cpp +++ b/src/voip/CallManager.cpp @@ -342,19 +342,15 @@ CallManager::sendInvite(const QString &roomid, CallType callType, unsigned int w return; } + const bool isRoomCall = roomInfo.member_count > 2; const RoomMember *callee = nullptr; if (roomInfo.member_count == 1) callee = &members.front(); else if (roomInfo.member_count == 2) callee = members.front().user_id == utils::localUser() ? &members.back() : &members.front(); - else { - emit ChatPage::instance()->showNotification( - QStringLiteral("Calls are limited to rooms with less than two members")); - clear(); - return; - } - if (!callee) { + + if (!isRoomCall && !callee) { nhlog::ui()->warn("WebRTC: failed to resolve callee for outbound invite in room {}", roomid.toStdString()); emit ChatPage::instance()->showNotification(QStringLiteral("Problem setting up call.")); @@ -384,7 +380,7 @@ CallManager::sendInvite(const QString &roomid, CallType callType, unsigned int w if (haveCallInvite_) { nhlog::ui()->debug("WebRTC: discarding outbound call for inbound call; localUser is polite party"); - if (callParty_ == callee->user_id) { + if ((isRoomCall && roomid_ == roomid) || (!isRoomCall && callParty_ == callee->user_id)) { if (callType == callType_) acceptInvite(); else { @@ -409,12 +405,21 @@ CallManager::sendInvite(const QString &roomid, CallType callType, unsigned int w ? "voice" : (callType_ == CallType::VIDEO ? "video" : "screen"); - nhlog::ui()->debug("WebRTC: call id: {} - creating {} invite", callid_, strCallType); - callParty_ = callee->user_id; - callPartyDisplayName_ = - callee->display_name.isEmpty() ? callee->user_id : callee->display_name; + nhlog::ui()->debug("WebRTC: call id: {} - creating {} {}invite", + callid_, + strCallType, + isRoomCall ? "room-wide " : ""); + if (isRoomCall) { + callParty_ = utils::localUser(); + callPartyDisplayName_ = + roomInfo.name.empty() ? roomid : QString::fromStdString(roomInfo.name); + } else { + callParty_ = callee->user_id; + callPartyDisplayName_ = + callee->display_name.isEmpty() ? callee->user_id : callee->display_name; + } callPartyAvatarUrl_ = QString::fromStdString(roomInfo.avatar_url); - invitee_ = callParty_.toStdString(); + invitee_ = isRoomCall ? std::string{} : callParty_.toStdString(); emit newInviteState(); playRingtone(QUrl(QStringLiteral("qrc:/media/media/ringback.ogg")), true);