aboutsummaryrefslogtreecommitdiff
path: root/Hotline/Models
diff options
context:
space:
mode:
authorDustin Mierau <dustin@mierau.me>2024-05-05 19:17:39 -0700
committerDustin Mierau <dustin@mierau.me>2024-05-05 19:17:39 -0700
commit3feb709522b38f1aa5ddedc5e1aee28597375aab (patch)
tree9df2ad849703004901261c53bcffad318b876ad4 /Hotline/Models
parent4da73c630183e482e4ab2accef97ad54c6741bf4 (diff)
Write better URL regular expressions for our needs.
Diffstat (limited to 'Hotline/Models')
-rw-r--r--Hotline/Models/Hotline.swift4
1 files changed, 2 insertions, 2 deletions
diff --git a/Hotline/Models/Hotline.swift b/Hotline/Models/Hotline.swift
index ccc23c1..d232533 100644
--- a/Hotline/Models/Hotline.swift
+++ b/Hotline/Models/Hotline.swift
@@ -211,7 +211,7 @@ class Hotline: Equatable, HotlineClientDelegate, HotlineFileClientDelegate {
}
@MainActor func sendInstantMessage(_ text: String, userID: UInt16) {
- let message = InstantMessage(direction: .outgoing, text: text, type: .message, date: Date())
+ let message = InstantMessage(direction: .outgoing, text: text.convertingLinksToMarkdown(), type: .message, date: Date())
if self.instantMessages[userID] == nil {
self.instantMessages[userID] = [message]
@@ -726,7 +726,7 @@ class Hotline: Equatable, HotlineClientDelegate, HotlineFileClientDelegate {
SoundEffectPlayer.shared.playSoundEffect(.chatMessage)
}
- let instantMessage = InstantMessage(direction: .incoming, text: message, type: .message, date: Date())
+ let instantMessage = InstantMessage(direction: .incoming, text: message.convertingLinksToMarkdown(), type: .message, date: Date())
if self.instantMessages[userID] == nil {
self.instantMessages[userID] = [instantMessage]
}