Support to system messages
This commit is contained in:
parent
c583b70b4c
commit
e887cf9744
|
@ -10,4 +10,6 @@ struct MessageResponse: Codable, Hashable {
|
|||
let t: String?
|
||||
let groupable: Bool?
|
||||
let editedAt: Date?
|
||||
let role: String?
|
||||
let comment: String?
|
||||
}
|
||||
|
|
|
@ -13,7 +13,11 @@ extension Room {
|
|||
var lastMessage: Message? {
|
||||
let request = Message.fetchRequest()
|
||||
|
||||
request.predicate = NSPredicate(format: "room == %@", self)
|
||||
let thisRoomPredicate = NSPredicate(format: "room == %@", self)
|
||||
let nonInfoMessagePredicate = NSPredicate(format: "t == nil", self)
|
||||
request.predicate = NSCompoundPredicate(
|
||||
andPredicateWithSubpredicates: [thisRoomPredicate, nonInfoMessagePredicate]
|
||||
)
|
||||
request.sortDescriptors = [NSSortDescriptor(keyPath: \Message.ts, ascending: false)]
|
||||
request.fetchLimit = 1
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="22222" systemVersion="22G120" minimumToolsVersion="Automatic" sourceLanguage="Swift" usedWithSwiftData="YES" userDefinedModelVersionIdentifier="">
|
||||
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="22222" systemVersion="23C64" minimumToolsVersion="Automatic" sourceLanguage="Swift" usedWithSwiftData="YES" userDefinedModelVersionIdentifier="">
|
||||
<entity name="Attachment" representedClassName="Attachment" syncable="YES" codeGenerationType="class">
|
||||
<attribute name="height" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
|
||||
<attribute name="id" optional="YES" attributeType="String"/>
|
||||
|
@ -9,10 +9,12 @@
|
|||
<relationship name="message" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Message" inverseName="attachments" inverseEntity="Message"/>
|
||||
</entity>
|
||||
<entity name="Message" representedClassName="Message" syncable="YES" codeGenerationType="class">
|
||||
<attribute name="comment" optional="YES" attributeType="String"/>
|
||||
<attribute name="editedAt" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
|
||||
<attribute name="groupable" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
|
||||
<attribute name="id" optional="YES" attributeType="String"/>
|
||||
<attribute name="msg" optional="YES" attributeType="String"/>
|
||||
<attribute name="role" optional="YES" attributeType="String"/>
|
||||
<attribute name="status" optional="YES" attributeType="String"/>
|
||||
<attribute name="t" optional="YES" attributeType="String"/>
|
||||
<attribute name="ts" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
|
||||
|
|
|
@ -170,6 +170,8 @@ final class RocketChatDatabase: Database {
|
|||
message.t = updatedMessage.t
|
||||
message.groupable = updatedMessage.groupable ?? true
|
||||
message.editedAt = updatedMessage.editedAt
|
||||
message.role = updatedMessage.role
|
||||
message.comment = updatedMessage.comment
|
||||
|
||||
updatedMessage.attachments?.forEach { attachment in
|
||||
process(updatedAttachment: attachment, in: message)
|
||||
|
|
|
@ -0,0 +1,165 @@
|
|||
import SwiftUI
|
||||
|
||||
struct InfoMessage {
|
||||
let msg: String
|
||||
let username: String
|
||||
let type: String
|
||||
let role: String
|
||||
let comment: String
|
||||
}
|
||||
|
||||
func getInfoMessage(_ infoMessage: InfoMessage) -> LocalizedStringKey {
|
||||
switch infoMessage.type {
|
||||
case "rm":
|
||||
return "message removed"
|
||||
case "uj":
|
||||
return "joined the channel"
|
||||
case "ujt":
|
||||
return "joined this team"
|
||||
case "ut":
|
||||
return "joined the conversation"
|
||||
case "r":
|
||||
return "changed room name to: \(infoMessage.msg)"
|
||||
case "ru":
|
||||
return "removed \(infoMessage.msg)"
|
||||
case "au":
|
||||
return "added \(infoMessage.msg)"
|
||||
case "user-muted":
|
||||
return "muted \(infoMessage.msg)"
|
||||
case "room_changed_description":
|
||||
return "changed room description to: \(infoMessage.msg)"
|
||||
case "room_changed_announcement":
|
||||
return "changed room announcement to: \(infoMessage.msg)"
|
||||
case "room_changed_topic":
|
||||
return "changed room topic to: \(infoMessage.msg)"
|
||||
case "room_changed_privacy":
|
||||
return "changed room to \(infoMessage.msg)"
|
||||
case "room_changed_avatar":
|
||||
return "changed room avatar"
|
||||
case "message_snippeted":
|
||||
return "created a snippet"
|
||||
case "room_e2e_disabled":
|
||||
return "disabled E2E encryption for this room"
|
||||
case "room_e2e_enabled":
|
||||
return "enabled E2E encryption for this room"
|
||||
case "removed-user-from-team":
|
||||
return "removed @\(infoMessage.msg) from this team"
|
||||
case "added-user-to-team":
|
||||
return "added @\(infoMessage.msg) to this team"
|
||||
case "user-added-room-to-team":
|
||||
return "added #\(infoMessage.msg) to this team"
|
||||
case "user-converted-to-team":
|
||||
return "converted #\(infoMessage.msg) to a team"
|
||||
case "user-converted-to-channel":
|
||||
return "converted #\(infoMessage.msg) to channel"
|
||||
case "user-deleted-room-from-team":
|
||||
return "deleted #\(infoMessage.msg)"
|
||||
case "user-removed-room-from-team":
|
||||
return "removed #\(infoMessage.msg) from this team"
|
||||
case "room-disallowed-reacting":
|
||||
return "disallowed reactions"
|
||||
case "room-allowed-reacting":
|
||||
return "allowed reactions"
|
||||
case "room-set-read-only":
|
||||
return "set room to read only"
|
||||
case "room-removed-read-only":
|
||||
return "removed read only permission"
|
||||
case "user-unmuted":
|
||||
return "unmuted \(infoMessage.msg)"
|
||||
case "room-archived":
|
||||
return "archived room"
|
||||
case "room-unarchived":
|
||||
return "unarchived room"
|
||||
case "subscription-role-added":
|
||||
return "defined \(infoMessage.msg) as \(infoMessage.role)"
|
||||
case "subscription-role-removed":
|
||||
return "removed \(infoMessage.msg) as \(infoMessage.role)"
|
||||
case "message_pinned":
|
||||
return "Pinned a message:"
|
||||
case "ul":
|
||||
return "left the channel"
|
||||
case "ult":
|
||||
return "has left the team"
|
||||
case "jitsi_call_started":
|
||||
return "Call started by \(infoMessage.username)"
|
||||
case "omnichannel_placed_chat_on_hold":
|
||||
return "Chat on hold: \(infoMessage.comment)"
|
||||
case "omnichannel_on_hold_chat_resumed":
|
||||
return "On hold chat resumed: \(infoMessage.comment)"
|
||||
case "command":
|
||||
return "returned the chat to the queue"
|
||||
case "livechat-started":
|
||||
return "Chat started"
|
||||
case "livechat-close":
|
||||
return "Conversation closed"
|
||||
case "livechat_transfer_history":
|
||||
return "New chat transfer: \(infoMessage.username) returned the chat to the queue"
|
||||
default:
|
||||
return "Unsupported system message"
|
||||
}
|
||||
}
|
||||
|
||||
func messageHaveAuthorName(_ messageType: String) -> Bool {
|
||||
messagesWithAuthorName.contains(messageType)
|
||||
}
|
||||
|
||||
extension InfoMessage {
|
||||
init(from message: Message) {
|
||||
self.init(
|
||||
msg: message.msg ?? "",
|
||||
username: message.user?.username ?? "",
|
||||
type: message.t ?? "",
|
||||
role: message.role ?? "",
|
||||
comment: message.comment ?? ""
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private let messagesWithAuthorName: Set<String> = [
|
||||
"r",
|
||||
"ru",
|
||||
"au",
|
||||
"rm",
|
||||
"uj",
|
||||
"ujt",
|
||||
"ut",
|
||||
"ul",
|
||||
"ult",
|
||||
"message_pinned",
|
||||
"message_snippeted",
|
||||
"removed-user-from-team",
|
||||
"added-user-to-team",
|
||||
"user-added-room-to-team",
|
||||
"user-converted-to-team",
|
||||
"user-converted-to-channel",
|
||||
"user-deleted-room-from-team",
|
||||
"user-removed-room-from-team",
|
||||
"omnichannel_placed_chat_on_hold",
|
||||
"omnichannel_on_hold_chat_resumed",
|
||||
"livechat_navigation_history",
|
||||
"livechat_transcript_history",
|
||||
"command",
|
||||
"livechat-started",
|
||||
"livechat-close",
|
||||
"livechat_video_call",
|
||||
"livechat_webrtc_video_call",
|
||||
"livechat_transfer_history",
|
||||
"room-archived",
|
||||
"room-unarchived",
|
||||
"user-muted",
|
||||
"room_changed_description",
|
||||
"room_changed_announcement",
|
||||
"room_changed_topic",
|
||||
"room_changed_privacy",
|
||||
"room_changed_avatar",
|
||||
"room_e2e_disabled",
|
||||
"room_e2e_enabled",
|
||||
"room-allowed-reacting",
|
||||
"room-disallowed-reacting",
|
||||
"room-set-read-only",
|
||||
"room-removed-read-only",
|
||||
"user-unmuted",
|
||||
"room-unarchived",
|
||||
"subscription-role-added",
|
||||
"subscription-role-removed"
|
||||
]
|
|
@ -53,12 +53,10 @@ final class MessageFormatter {
|
|||
|
||||
func info() -> LocalizedStringKey? {
|
||||
switch message.t {
|
||||
case "rm":
|
||||
return "Message Removed"
|
||||
case "e2e":
|
||||
return "Encrypted message"
|
||||
default:
|
||||
return nil
|
||||
case .some:
|
||||
return getInfoMessage(.init(from: message))
|
||||
case .none:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,22 @@
|
|||
{
|
||||
"sourceLanguage" : "en",
|
||||
"strings" : {
|
||||
"%@ " : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "%@"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "%@"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"%@ sent an attachment" : {
|
||||
"extractionState" : "manual",
|
||||
"localizations" : {
|
||||
|
@ -18,6 +34,86 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"added @%@ to this team" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "このチームに @%@ を追加しました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "adicionou @%@ a este time"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"added #%@ to this team" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "このチームに #%@ を追加しました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "adicionou #%@ a este time"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"added %@" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "%@ を追加しました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "adicionou o usuário %@"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"allowed reactions" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "許可されたリアクション"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "adicionou permissão de reagir"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"archived room" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "アーカイブされたルーム"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "arquivou a sala"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Attachment not supported." : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
|
@ -51,6 +147,22 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"Call started by %@" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "通話開始者 %@"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Chamada iniciada por %@"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Call started by: %@" : {
|
||||
"extractionState" : "manual",
|
||||
"localizations" : {
|
||||
|
@ -68,6 +180,182 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"changed room announcement to: %@" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "がルームアナウンスを次のように変更しました: %@"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "alterou o anúncio da sala para: %@"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"changed room avatar" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "ルームのアバターを変更しました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "alterou avatar da sala"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"changed room description to: %@" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "が部屋の説明を次のように変更しました: %@"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "alterou a descrição da sala para: %@"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"changed room name to: %@" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "がルーム名を %@ に変更しました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "alterou o nome da sala para: %@"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"changed room to %@" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "が部屋を %@ に変更しました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "mudou sala para %@"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"changed room topic to: %@" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "がルームのトピックを次のように変更しました: %@"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "mudou tópico da sala para: %@"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Chat on hold: %@" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "チャット保留中: %@"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Conversa em espera: %@"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Chat started" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "チャットが始まりました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Conversa iniciada"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Conversation closed" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "会話は終了しました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Conversa encerrada"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"converted #%@ to a team" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "が #%@ をチームに変換しました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "converteu #%@ em time"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"converted #%@ to channel" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "が #%@ をチャネルに変換しました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "converteu #%@ em canal"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Could not connect to your iPhone." : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
|
@ -132,6 +420,44 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"created a snippet" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "%@ がスニペットを作成しました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "criou um snippet"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"defined %@ as %@" : {
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "defined %1$@ as %2$@"
|
||||
}
|
||||
},
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "は %1$@ を %2$@ として定義しました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "definiu %1$@ como %2$@"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Delete" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
|
@ -148,6 +474,70 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"deleted #%@" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "#%@ を削除しました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "#%@ apagada"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"disabled E2E encryption for this room" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "このルームの E2E 暗号化が無効になりました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "desabilitou criptografia para essa sala"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"disallowed reactions" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "%@ 許可されていないリアクション"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "removeu a permissão de reagir"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"enabled E2E encryption for this room" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "このルームの E2E 暗号化が有効になりました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "habilitou criptografia para essa sala"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Encrypted message" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
|
@ -164,6 +554,86 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"has left the team" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "はチームを離れました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "saiu do time"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"joined the channel" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "がチャンネルに参加しました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "entrou no canal"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"joined the conversation" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "さんが会話に参加しました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "entrou na conversa"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"joined this team" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "がこのチームに参加しました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "entrou no time"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"left the channel" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "がチャンネルを離れました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "saiu da conversa"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Load More..." : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
|
@ -196,7 +666,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"Message Removed" : {
|
||||
"message removed" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
|
@ -207,7 +677,39 @@
|
|||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Mensagem Removida"
|
||||
"value" : "mensagem removida"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"muted %@" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "をミュートしました %@"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "silenciou o usuário %@"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"New chat transfer: %@ returned the chat to the queue" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "新しいチャット転送: %@ がチャットをキューに戻しました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Nova transferência de conversa: %@ retornou conversa para a fila"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -245,6 +747,38 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"On hold chat resumed: %@" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "保留中のチャットが再開されました: %@"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Conversa em espera retomada: %@"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Pinned a message:" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "メッセージを固定しました:"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Fixou uma mensagem:"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Please unlock your iPhone." : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
|
@ -277,6 +811,92 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"removed @%@ from this team" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "がこのチームから @%@ を削除しました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "removeu @%@ deste time"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"removed #%@ from this team" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "がこのチームから #%@ を削除しました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "removeu #%@ deste time"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"removed %@" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "が削除されました %@"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "removeu %@"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"removed %@ as %@" : {
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "removed %1$@ as %2$@"
|
||||
}
|
||||
},
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "%1$@ を %2$@ として削除しました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "removeu %1$@ como %2$@"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"removed read only permission" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "は読み取り専用権限を削除しました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "removeu permissão de escrita da sala"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Resend" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
|
@ -293,6 +913,22 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"returned the chat to the queue" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "はチャットをキューに戻しました"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "retornou conversa para a fila"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Rooms" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
|
@ -331,6 +967,22 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"set room to read only" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "ルームを読み取り専用に設定します"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "adicionou permissão de escrita à sala"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"This room is read only" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
|
@ -363,6 +1015,22 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"unarchived room" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "未アーカイブルーム"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "desarquivou a sala"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Unexpected error." : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
|
@ -379,6 +1047,22 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"unmuted %@" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "ミュート解除 %@"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "permitiu que %@ fale na sala"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Unread messages" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
|
@ -395,6 +1079,22 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"Unsupported system message" : {
|
||||
"localizations" : {
|
||||
"ja" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "サポートされていないシステム メッセージ"
|
||||
}
|
||||
},
|
||||
"pt-BR" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Mensagem de sistema não suportada"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"You" : {
|
||||
"extractionState" : "manual",
|
||||
"localizations" : {
|
||||
|
|
|
@ -43,7 +43,7 @@ final class MessageViewModel: ObservableObject {
|
|||
}
|
||||
|
||||
var isHeader: Bool {
|
||||
messageFormatter.isHeader()
|
||||
messageFormatter.isHeader() && !messageHaveAuthorName(message.t ?? "")
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -78,8 +78,7 @@ struct MessageView: View {
|
|||
}
|
||||
}
|
||||
if let text = viewModel.info {
|
||||
Text(text)
|
||||
.font(.caption.italic())
|
||||
(Text("\(viewModel.sender ?? "") ").font(.caption.bold().italic()) + Text(text).font(.caption.italic()))
|
||||
.foregroundStyle(.primary)
|
||||
} else if let text = viewModel.message.msg {
|
||||
HStack(alignment: .top) {
|
||||
|
|
|
@ -134,6 +134,8 @@
|
|||
1E9A71772B59FCA900477BA2 /* URLSessionCertificateHandling.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E9A71762B59FCA900477BA2 /* URLSessionCertificateHandling.swift */; };
|
||||
1EB375892B55DBFB00AEC3D7 /* Server.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EB375882B55DBFB00AEC3D7 /* Server.swift */; };
|
||||
1EB8EF722510F1EE00F352B7 /* Storage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EB8EF712510F1EE00F352B7 /* Storage.swift */; };
|
||||
1EC687BA2BA0FF0D00C7BAAD /* MessageInfoMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EC687B82BA0FECC00C7BAAD /* MessageInfoMapper.swift */; };
|
||||
1EC687BB2BA0FF0D00C7BAAD /* MessageInfoMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EC687B82BA0FECC00C7BAAD /* MessageInfoMapper.swift */; };
|
||||
1EC6ACB722CB9FC300A41C61 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1EC6ACB522CB9FC300A41C61 /* MainInterface.storyboard */; };
|
||||
1EC6ACBB22CB9FC300A41C61 /* ShareRocketChatRN.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 1EC6ACB022CB9FC300A41C61 /* ShareRocketChatRN.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
1EC6ACF622CBA01500A41C61 /* ShareRocketChatRN.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EC6ACF522CBA01500A41C61 /* ShareRocketChatRN.m */; };
|
||||
|
@ -525,6 +527,7 @@
|
|||
1E9A71762B59FCA900477BA2 /* URLSessionCertificateHandling.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLSessionCertificateHandling.swift; sourceTree = "<group>"; };
|
||||
1EB375882B55DBFB00AEC3D7 /* Server.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Server.swift; sourceTree = "<group>"; };
|
||||
1EB8EF712510F1EE00F352B7 /* Storage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Storage.swift; sourceTree = "<group>"; };
|
||||
1EC687B82BA0FECC00C7BAAD /* MessageInfoMapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageInfoMapper.swift; sourceTree = "<group>"; };
|
||||
1EC6ACB022CB9FC300A41C61 /* ShareRocketChatRN.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = ShareRocketChatRN.appex; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1EC6ACB622CB9FC300A41C61 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = "<group>"; };
|
||||
1EC6ACB822CB9FC300A41C61 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
|
@ -808,6 +811,7 @@
|
|||
1E29A31E2B5871BE0093C03C /* Formatters */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1EC687B72BA0FEBB00C7BAAD /* Mapper */,
|
||||
1E29A31F2B5871C80093C03C /* RoomFormatter.swift */,
|
||||
1E29A3212B5871CE0093C03C /* MessageFormatter.swift */,
|
||||
);
|
||||
|
@ -897,6 +901,14 @@
|
|||
path = Models;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1EC687B72BA0FEBB00C7BAAD /* Mapper */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1EC687B82BA0FECC00C7BAAD /* MessageInfoMapper.swift */,
|
||||
);
|
||||
path = Mapper;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1EC6ACB122CB9FC300A41C61 /* ShareRocketChatRN */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -2089,6 +2101,7 @@
|
|||
1E4AFC212B5B1AA000E2AA7D /* AppView.swift in Sources */,
|
||||
1E29A2FB2B585B070093C03C /* MessagesRequest.swift in Sources */,
|
||||
1E29A31D2B5871B60093C03C /* Date+Extensions.swift in Sources */,
|
||||
1EC687BB2BA0FF0D00C7BAAD /* MessageInfoMapper.swift in Sources */,
|
||||
1E29A2F62B585B070093C03C /* UserResponse.swift in Sources */,
|
||||
1ED033AE2B55B1CC004F4930 /* Default.xcdatamodeld in Sources */,
|
||||
1ED033BF2B55BF94004F4930 /* Storage.swift in Sources */,
|
||||
|
@ -2167,6 +2180,7 @@
|
|||
1ED1ECBB2B86997F00F6620C /* AppView.swift in Sources */,
|
||||
1ED1ECBC2B86997F00F6620C /* MessagesRequest.swift in Sources */,
|
||||
1ED1ECBD2B86997F00F6620C /* Date+Extensions.swift in Sources */,
|
||||
1EC687BA2BA0FF0D00C7BAAD /* MessageInfoMapper.swift in Sources */,
|
||||
1ED1ECBE2B86997F00F6620C /* UserResponse.swift in Sources */,
|
||||
1ED1ECBF2B86997F00F6620C /* Default.xcdatamodeld in Sources */,
|
||||
1ED1ECC02B86997F00F6620C /* Storage.swift in Sources */,
|
||||
|
|
Loading…
Reference in New Issue