-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into better-voice-message-handling
Signed-off-by: Daniel <[email protected]>
- Loading branch information
Showing
168 changed files
with
4,058 additions
and
1,652 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
# SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors | ||
# SPDX-License-Identifier: MIT | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: 🗺️ Feature request for the full Nextcloud Talk suite | ||
url: https://github.com/nextcloud/spreed/issues/new/choose | ||
about: Suggest an idea for Nextcloud Talk for all users, client and server | ||
- name: ❓ Community Support and Help | ||
url: https://help.nextcloud.com/ | ||
about: Configuration, webserver/proxy or performance issues and other questions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,9 +51,14 @@ jobs: | |
restore-keys: | | ||
${{ runner.os }}-pods- | ||
- name: Setup Cocoapods | ||
uses: maxim-lobanov/[email protected] | ||
with: | ||
version: latest | ||
|
||
- name: Set up dependencies talk-ios | ||
run: | | ||
pod install | ||
pod install | ||
- name: Build NextcloudTalk iOS for testing | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ ThirdParty/WebRTC.xcframework | |
testResult.xcresult | ||
dictionary.dic | ||
DerivedData | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,7 @@ CallKit | |
Unban | ||
unban | ||
Zammad | ||
Strikethrough | ||
Unarchive | ||
unarchive | ||
unarchived |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// | ||
// SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
// | ||
|
||
import Foundation | ||
|
||
public typealias RoomInternalIdString = String | ||
|
||
public class AiSummaryTask { | ||
public var taskIds = [Int]() | ||
public var outputs = [String]() | ||
} | ||
|
||
public class AiSummaryController { | ||
|
||
public static let shared = AiSummaryController() | ||
|
||
public var generateSummaryTasks = [RoomInternalIdString: AiSummaryTask]() | ||
|
||
public func addSummaryTaskId(forRoomInternalId internalId: String, withTaskId taskId: Int) { | ||
let task = generateSummaryTasks[internalId, default: AiSummaryTask()] | ||
|
||
task.taskIds.append(taskId) | ||
generateSummaryTasks[internalId] = task | ||
} | ||
|
||
public func markSummaryTaskAsDone(forRoomInternalId internalId: String, withTaskId taskId: Int, withOutput output: String) { | ||
guard let task = generateSummaryTasks[internalId] else { return } | ||
|
||
task.taskIds.removeAll(where: { $0 == taskId }) | ||
task.outputs.append(output) | ||
} | ||
|
||
@discardableResult | ||
public func finalizeSummaryTask(forRoomInternalId internalId: String) -> [String] { | ||
let result = generateSummaryTasks[internalId]?.outputs ?? [] | ||
generateSummaryTasks.removeValue(forKey: internalId) | ||
|
||
return result | ||
} | ||
|
||
public func getSummaryTaskIds(forRoomInternalId internalId: String) -> [Int] { | ||
return generateSummaryTasks[internalId]?.taskIds ?? [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
// | ||
// SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
// | ||
|
||
import UIKit | ||
|
||
class AiSummaryViewController: UIViewController { | ||
|
||
private var summaryText: String = "" | ||
|
||
@IBOutlet weak var warningView: UIView! | ||
@IBOutlet weak var warningTextLabel: UILabel! | ||
@IBOutlet weak var saveToNoteToSelf: NCButton! | ||
@IBOutlet weak var summaryTextView: UITextView! | ||
|
||
init(summaryText: String) { | ||
self.summaryText = summaryText | ||
|
||
super.init(nibName: nil, bundle: nil) | ||
} | ||
|
||
required init?(coder aDecoder: NSCoder) { | ||
super.init(coder: aDecoder) | ||
} | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
|
||
NCAppBranding.styleViewController(self) | ||
|
||
let barButtonItem = UIBarButtonItem(title: nil, style: .plain, target: nil, action: nil) | ||
barButtonItem.primaryAction = UIAction(title: NSLocalizedString("Close", comment: ""), handler: { [unowned self] _ in | ||
self.dismiss(animated: true) | ||
}) | ||
self.navigationItem.rightBarButtonItems = [barButtonItem] | ||
|
||
saveToNoteToSelf.setTitle(NSLocalizedString("Save to 'Note to self'", comment: ""), for: .normal) | ||
saveToNoteToSelf.setButtonStyle(style: .primary) | ||
|
||
warningView.layer.cornerRadius = 8 | ||
warningView.layer.borderColor = NCAppBranding.placeholderColor().cgColor | ||
warningView.layer.borderWidth = 1 | ||
warningView.layer.masksToBounds = true | ||
|
||
warningTextLabel.text = NSLocalizedString("This summary is AI generated and may contain mistakes.", comment: "") | ||
|
||
summaryTextView.text = self.summaryText | ||
} | ||
|
||
@IBAction func saveToNoteToSelfPressed(_ sender: Any) { | ||
let activeAccount = NCDatabaseManager.sharedInstance().activeAccount() | ||
|
||
self.saveToNoteToSelf.setButtonEnabled(enabled: false) | ||
|
||
NCAPIController.sharedInstance().getNoteToSelfRoom(forAccount: activeAccount) { roomDict, error in | ||
if error == nil, let room = NCRoom(dictionary: roomDict, andAccountId: activeAccount.accountId) { | ||
|
||
NCAPIController.sharedInstance().sendChatMessage(self.summaryTextView.text, toRoom: room.token, displayName: nil, replyTo: -1, referenceId: nil, silently: false, for: activeAccount) { error in | ||
if error == nil { | ||
NotificationPresenter.shared().present(text: NSLocalizedString("Added note to self", comment: ""), dismissAfterDelay: 5.0, includedStyle: .success) | ||
} else { | ||
self.saveToNoteToSelf.setButtonEnabled(enabled: true) | ||
NotificationPresenter.shared().present(text: NSLocalizedString("An error occurred while adding note", comment: ""), dismissAfterDelay: 5.0, includedStyle: .error) | ||
} | ||
} | ||
} else { | ||
self.saveToNoteToSelf.setButtonEnabled(enabled: true) | ||
NotificationPresenter.shared().present(text: NSLocalizedString("An error occurred while adding note", comment: ""), dismissAfterDelay: 5.0, includedStyle: .error) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> | ||
<device id="retina6_1" orientation="portrait" appearance="light"/> | ||
<dependencies> | ||
<deployment identifier="iOS"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/> | ||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> | ||
<capability name="System colors in document resources" minToolsVersion="11.0"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<objects> | ||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="AiSummaryViewController" customModule="NextcloudTalk" customModuleProvider="target"> | ||
<connections> | ||
<outlet property="saveToNoteToSelf" destination="d2N-C7-sYL" id="gAs-3g-Nhb"/> | ||
<outlet property="summaryTextView" destination="kWW-BG-TWM" id="KP2-kO-EM5"/> | ||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> | ||
<outlet property="warningTextLabel" destination="gUd-g3-bka" id="9Le-zN-hR3"/> | ||
<outlet property="warningView" destination="aZn-kU-a4A" id="rry-r5-a8s"/> | ||
</connections> | ||
</placeholder> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> | ||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT"> | ||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<subviews> | ||
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="kWW-BG-TWM"> | ||
<rect key="frame" x="10" y="102" width="394" height="652"/> | ||
<color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
<mutableString key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut lLorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in </mutableString> | ||
<color key="textColor" systemColor="labelColor"/> | ||
<fontDescription key="fontDescription" type="system" pointSize="14"/> | ||
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/> | ||
</textView> | ||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="HDS-I5-5AY"> | ||
<rect key="frame" x="10" y="764" width="394" height="98"/> | ||
<subviews> | ||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aZn-kU-a4A" userLabel="Warning View"> | ||
<rect key="frame" x="77" y="0.0" width="240" height="50"/> | ||
<subviews> | ||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="AI Warning" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gUd-g3-bka"> | ||
<rect key="frame" x="15" y="10" width="215" height="30"/> | ||
<fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
<nil key="textColor"/> | ||
<nil key="highlightedColor"/> | ||
</label> | ||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4zd-CF-bax"> | ||
<rect key="frame" x="0.0" y="0.0" width="5" height="50"/> | ||
<color key="backgroundColor" systemColor="systemYellowColor"/> | ||
<constraints> | ||
<constraint firstAttribute="width" constant="5" id="rRU-wl-5VU"/> | ||
</constraints> | ||
</view> | ||
</subviews> | ||
<color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
<constraints> | ||
<constraint firstAttribute="bottom" secondItem="gUd-g3-bka" secondAttribute="bottom" constant="10" id="598-zr-uee"/> | ||
<constraint firstItem="gUd-g3-bka" firstAttribute="top" secondItem="aZn-kU-a4A" secondAttribute="top" constant="10" id="Cct-5f-OBw"/> | ||
<constraint firstItem="4zd-CF-bax" firstAttribute="leading" secondItem="aZn-kU-a4A" secondAttribute="leading" id="TU1-V9-cjP"/> | ||
<constraint firstItem="gUd-g3-bka" firstAttribute="leading" secondItem="4zd-CF-bax" secondAttribute="trailing" constant="10" id="dvf-Bd-Lav"/> | ||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="20" id="nAq-tm-7xg"/> | ||
<constraint firstItem="4zd-CF-bax" firstAttribute="top" secondItem="aZn-kU-a4A" secondAttribute="top" id="naM-oV-9qs"/> | ||
<constraint firstAttribute="trailing" secondItem="gUd-g3-bka" secondAttribute="trailing" constant="10" id="nw6-dW-faE"/> | ||
<constraint firstAttribute="bottom" secondItem="4zd-CF-bax" secondAttribute="bottom" id="tDg-eA-ama"/> | ||
</constraints> | ||
</view> | ||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="d2N-C7-sYL" userLabel="Save to note to self" customClass="NCButton" customModule="NextcloudTalk" customModuleProvider="target"> | ||
<rect key="frame" x="148" y="58" width="98" height="40"/> | ||
<constraints> | ||
<constraint firstAttribute="width" relation="greaterThanOrEqual" id="3r9-cH-CLj"/> | ||
<constraint firstAttribute="height" constant="40" id="hGU-lZ-L60"/> | ||
</constraints> | ||
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/> | ||
<inset key="contentEdgeInsets" minX="24" minY="0.0" maxX="24" maxY="0.0"/> | ||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> | ||
<state key="normal" title="Button"> | ||
<color key="titleColor" systemColor="labelColor"/> | ||
</state> | ||
<connections> | ||
<action selector="saveToNoteToSelfPressed:" destination="-1" eventType="touchUpInside" id="KvC-u8-Hcf"/> | ||
</connections> | ||
</button> | ||
</subviews> | ||
</stackView> | ||
</subviews> | ||
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> | ||
<color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
<constraints> | ||
<constraint firstItem="HDS-I5-5AY" firstAttribute="top" secondItem="kWW-BG-TWM" secondAttribute="bottom" constant="10" id="C6w-nB-yaf"/> | ||
<constraint firstItem="kWW-BG-TWM" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="10" id="L3p-dS-lyN"/> | ||
<constraint firstItem="HDS-I5-5AY" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="10" id="ZvA-oB-7uy"/> | ||
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="HDS-I5-5AY" secondAttribute="bottom" id="a1b-FO-AY1"/> | ||
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="kWW-BG-TWM" secondAttribute="trailing" constant="10" id="eih-rD-OcA"/> | ||
<constraint firstItem="kWW-BG-TWM" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="10" id="m5L-aD-vsu"/> | ||
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="HDS-I5-5AY" secondAttribute="trailing" constant="10" id="zeZ-gu-9BY"/> | ||
</constraints> | ||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/> | ||
<point key="canvasLocation" x="82.608695652173921" y="91.741071428571431"/> | ||
</view> | ||
</objects> | ||
<resources> | ||
<systemColor name="labelColor"> | ||
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
</systemColor> | ||
<systemColor name="systemBackgroundColor"> | ||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
</systemColor> | ||
<systemColor name="systemYellowColor"> | ||
<color red="1" green="0.80000000000000004" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
</systemColor> | ||
</resources> | ||
</document> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.