mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 02:25:20 +00:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user