Show notifications for other people's posts

Closes #161
This commit is contained in:
Shadowfacts 2022-05-17 10:36:33 -04:00
parent dbdf1d39bd
commit 2617d22819
1 changed files with 4 additions and 0 deletions

View File

@ -21,6 +21,10 @@ public class Notification: Decodable {
self.id = try container.decode(String.self, forKey: .id) self.id = try container.decode(String.self, forKey: .id)
if let kind = try? container.decode(Kind.self, forKey: .kind) { if let kind = try? container.decode(Kind.self, forKey: .kind) {
self.kind = kind self.kind = kind
} else if let s = try? container.decode(String.self, forKey: .kind),
s == "status" {
// represent notifications of other people posting as regular mentions for now
self.kind = .mention
} else { } else {
self.kind = .unknown self.kind = .unknown
} }