Refactor: BitchatMessage (#610)

* Extract BitchatMessage into a separate file

* Convert `fromBinaryPayload` to `convenience init?`

* Extract message dedup into an extension

* Remove dead `formatMessageContent`

* Minor refactor of timestamp and username formatting

* Remove dead `getSenderColor`
This commit is contained in:
Islam
2025-09-15 15:00:12 +02:00
committed by GitHub
parent 347ce5ece4
commit ea8d51a36b
11 changed files with 392 additions and 449 deletions
+1 -1
View File
@@ -309,7 +309,7 @@ final class MockBLEService: NSObject {
func simulateIncomingPacket(_ packet: BitchatPacket) {
// Process through the actual handling logic
if let message = BitchatMessage.fromBinaryPayload(packet.payload) {
if let message = BitchatMessage(packet.payload) {
var shouldDeliver = false
seenLock.lock()
if !seenMessageIDs.contains(message.id) {