We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f1fdff8 + d23a3bc commit 13c1e7cCopy full SHA for 13c1e7c
Modules/Sources/ParsingClient/Parsers/QMSParser.swift
@@ -51,12 +51,19 @@ public struct QMSChatParser {
51
52
private static func parseAttachments(_ array: [[Any]]) -> [QMSMessage.Attachment] {
53
return array.map { attachment in
54
+ let type = attachment[1] as! Int
55
+ let downloadCount = if type == 1 {
56
+ 1 // FIXME: Quickfix for images. In normal situation they should handling by another way.
57
+ } else {
58
+ attachment[4] as! Int
59
+ }
60
+
61
return QMSMessage.Attachment(
62
id: attachment[0] as! Int,
63
flag: attachment[1] as! Int,
64
name: attachment[2] as! String,
65
size: attachment[3] as! Int,
- downloadsCount: attachment[4] as! Int
66
+ downloadsCount: downloadCount
67
)
68
}
69
0 commit comments