Commit Graph
16 Commits
Author SHA1 Message Date
CC fc38a8c6b6 refactor 2026-06-10 14:14:28 +02:00
CC 2bd2751a6a cleanup logging 2026-06-10 13:57:03 +02:00
a1denvalu3andGitHub b079ae8742 fix(sync): resolve hash alignment and early break bugs on GCS filter trimming (#708)
* fix(sync): resolve hash alignment and early break bugs on GCS filter trimming

* fix(sync): filter out zero bucket and deduplicate buckets before encoding

* fix(sync): preserve zero-bucket mapping by clamping 0 to 1 during encoding and decoding
2026-06-08 19:00:03 -05:00
054887bad8 Fix request sync duplicate public messages (#707)
Co-authored-by: CC <cc@ggg.local>
2026-06-08 15:41:11 -05:00
callebtcandGitHub db26b673ee fix: Ensure empty neighbor lists in newer announcements clear mesh edges (#620)
* fix: Ensure empty neighbor lists in newer announcements clear mesh edges

- Refactored MeshGraphService.updateFromAnnouncement to prioritize timestamp checks.
- Treated null neighbor lists (omitted TLV) as empty lists to allow peer disconnection/isolation updates to propagate.
- Added MeshGraphServiceTest to verify timestamp logic and edge eviction.

* fix(test): Use TestOnly API to reset singleton instead of reflection

- Added MeshGraphService.resetForTesting()
- Updated MeshGraphServiceTest to use the new API, avoiding fragile reflection on companion object fields.
2026-01-15 23:01:56 +07:00
callebtcandGitHub 66012e9fe9 Gossip mesh topology + source-based routing (#445)
* wip mesh graph

* gossip fix

* gossip works

* source-based routing wip

* log

* update spec to be explicit about intermediate hops only

* drop duplicate hops

* add to spec

* test

* forgot comma

* source routing v2

* add compression bomb protection

* v2 source routing

* fragmented packets inherit route

* update spec

* Gossip routing tmp with connection limit fixed (#569)

* fix: r8 exception for LocationManager (#566)

* fragmented packets inherit route

* update spec

* fix connection limits

* fix: deserialization issue with routed packets

* log

* dynamic fragment size

* fragment size

* add tests

* feat(gossip): implement two-way handshake for source routing edges

- Update MeshGraphService to track directed announcements
- Require bidirectional announcements for a 'confirmed' edge
- Update RoutePlanner to strictly use confirmed edges
- Update Mesh Topology debug view to show confirmed vs unconfirmed edges (solid vs dotted)

* docs: update SOURCE_ROUTING.md with two-way handshake requirement

* evict stale peers from mesh graph service

* better logging

* fix announce spe

* fix: empty route

* fix spec

* fix: compile error in DebugSettingsSheet and potential NPE in RoutePlanner

* revert

* try again
2026-01-13 04:18:07 +07:00
callebtcandGitHub 171483a1da drop duplicate announces based on TTL (#558) 2026-01-05 16:41:17 +07:00
callebtcandGitHub 55b2d68def Enforce mandatory packet signature verification (#546)
* security: enforce mandatory packet signature verification

* tests: add comprehensive unit tests for packet signature verification
2026-01-04 18:47:24 +07:00
RebroadandGitHub 54c96bd737 Fix: Add @ConscryptMode annotation to FileTransferTest to resolve UnsatisfiedLinkError (#543)
Robolectric 4.9+ uses Conscrypt as the default security provider, which
requires native libraries that aren't available in the test environment.
Adding @ConscryptMode(Mode.OFF) disables Conscrypt and uses BouncyCastle
instead, which resolves the test failures.

This fixes the build failures in FileTransferTest where all 9 tests were
failing with UnsatisfiedLinkError when Conscrypt tried to load native
libraries.

Fixes #542
2026-01-04 13:41:38 +07:00
callebtcandGitHub 2b0bb5af74 fix unit tests (#442) 2025-09-20 00:05:46 +02:00
callebtcandGitHub 633a506753 Media transfers (#440)
* tor voice wip

* worky BLE a bit

* can send sound

* remove tor

* ui cleanup

* recording time

* progress bar color

* nicknames for audio

* onboarding permissions no microphone

* may work

* fix destionation

* extend

* refactor voice input component

* fix keyboard collapse issue

* send images

* wip image open

* image sending works

* wip waveforms

* better

* better animation

* fix cursor for sending audio

* image sending animation

* image sending animation

* full screen image viewer

* gossip sync for fragments too

* reduce delays

* fix keyboard focus

* use v2 for file transfers

* do not sync fragments

* scrollable image viewer

* ui

* ui adjustments

* nicer animation

* seek through audio

* add spec

* add more details to documentation

* File sharing E2E:
- Add TLV BitchatFilePacket, FileSharingManager
- Implement sendFileNote in ChatViewModel
- File receive path: save to files/incoming and render [file] messages with FileMessageItem or FileSendingAnimation during transfer
- SAF FilePickerButton and dispatcher wiring; image/file choice to follow in MediaPickerOptions
- Add FileViewerDialog with system open/save, FileProvider and file_paths
- Hook transfer progress to file sending UI
- Manifest: READ_MEDIA_* and FileProvider
- Fix MessageHandler saving and prefix for non-image payloads
- Add helper utils (FileUtils)

* kinda wip

* fix buttons

* files half working

* wip file transfer

* file packet has 2-byte TLV and chunks. it wokrs but it sucks

* clean

* remove gossip sync for fragments

* fix audio and image rendering

* adjust FILE_SIZE TLV size too

* cleanup

* haptic

* private messages media

* read receipts for media

* use enum for message type not string

* delivery ack checks dont push content

* check

* animation fix

* refactor

* ui adjustments

* comments

* refactor

* fix crash on send and receive of the same file

* refactor notifications

* tests
2025-09-19 22:46:14 +02:00
MinhandGitHub 02d5466812 Add active peer notification (#273)
* adding notification for active peers + tests

* adding a recently seen peer set to track if we've seen that peer before

* changing back to notificationManager naming

* fixing some weird formatting that occurred during merge conflict fix
2025-08-28 09:17:41 +02:00
Shubert MunthaliandGitHub 763d290055 Mock Android Log to fix PeerManager tests (#239) 2025-08-07 14:39:08 +03:00
62e1b752af Add PeerManager unit tests (#171)
* Add PeerManager unit tests

* Improve PeerManager tests

---------

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2025-08-05 23:51:34 +02:00
Tobiloba OyelekanandGitHub 335f914f32 Add MainViewModelTest (#163) 2025-08-05 23:45:05 +02:00
Shubert Munthali 5b2cbe9516 Add unit tests package and migrate test_color.kt to unit testing 2025-07-11 14:50:59 +02:00