Commit graph

38 commits

Author SHA1 Message Date
James Rich
a28dc377ae
fix: Handle node public key mismatch and show warning (#1720)
* Handle node public key mismatch and show warning

- Add a mismatchKey flag to Node and MessageTopBar to indicate a public key mismatch.
- Set the public key to a default error value (all zeros) when a node's public key changes.
- Display a warning in the MessageTopBar when a key mismatch is detected in PKC.
- Only clear all nodes when a different mynode number is present.

* feat: Add key mismatch detection to NodeInfoDao

This commit introduces a new feature to the `NodeInfoDao` that detects and handles public key mismatches for existing nodes.

-   A new function `upsertCheckKeyMatch` is added to `NodeInfoDao` that checks for public key changes when upserting a node. If a mismatch is detected, the public key is set to `ERROR_BYTE_STRING`, and a warning is logged.
- The function `upsertCheckKeyMatch` is used instead of `upsert` in `NodeRepository` and in `putAll` inside of `NodeInfoDao`.
-   A new test `testPkcMismatch` is added to `NodeInfoDaoTest` to verify the key mismatch detection.
- Changed `testNodes` to have unique public keys.
- Added `mismatchKey` state to the node model.

* detekt spacing

* Refactor: Correctly handle different node installations in NodeRepository

The logic for detecting different node installations in `NodeRepository.kt` was inverted, this commit fixes the logic to use `!=` instead of `==` to detect if the node number has changed.
2025-03-27 15:58:43 -05:00
andrekir
13b615a470 chore: update license header 2025-01-02 07:00:51 -03:00
Andre K
60e7e18116
feat(config): implement excluded modules validation (#1460)
* feat(config): implement excluded modules validation

* feat: hide excluded configs from metadata

* refactor: save local metadata from WantConfig

* refactor: delete metadata from deleted nodes

* fix: always request metadata for admin routes

* feat: show node firmware when metadata is available

* refactor: rename filter function

* feat: add `ServiceAction` request metadata
2025-01-02 06:38:33 -03:00
andrekir
1ea55b2209 refactor: move ignore node to is_ignored field in NodeInfo 2024-12-07 08:18:18 -03:00
andrekir
4a1319a645 refactor: replace user with node in Message model 2024-12-05 19:50:15 -03:00
James Rich
2234f5a713
feat: add emoji reactions to message bubbles (#1421)
* Add tapback emojis to message bubbles

Added TapBackEmojiItem composable to display tapback emojis.
Included it in MessageItem composable for incoming messages.
Added a FlowRow to show tapback emojis below the message bubble.

* feat: Add EmojiPicker View

* feat: show emojis for local messages

* feat: Add emoji tapbacks to messages

This commit introduces the ability to send and receive emoji tapbacks for messages.

- Adds emoji and replyId fields to DataPacket.
- Adds emoji tapback support to the MeshService
- Modifies UIState to handle emojis in message lists.

* feat: store tapbacks in database

Store tapbacks in the database and display them in the message list.
- Add a new table to the database to store tapbacks.
- Add a new DAO method to insert and retrieve tapbacks.
- Update the message list UI to display tapbacks.

* refactor: relation db and other changes

---------

Co-authored-by: Andre K <andrekir@pm.me>
2024-12-03 08:57:35 -03:00
andrekir
1219d3037e chore: add GPL-3.0 license headers to source files 2024-11-26 08:54:18 -03:00
Andre K
475e9fc22c
refactor: migrate QuickChat to Compose (#1419) 2024-11-19 11:59:28 -03:00
andrekir
c98a5c7caf feat: add info cards for environment and power metrics 2024-10-19 13:28:16 -03:00
andrekir
eacf3a87a0 feat: create NodeEntity.isUnknownUser property 2024-10-14 17:20:06 -03:00
andrekir
fe56d257f5 chore: add detekt formatting rule set
https://detekt.dev/docs/next/rules/formatting/
2024-10-14 07:56:29 -03:00
andrekir
b503c10789 refactor: finish transition from NodeInfo to NodeEntity 2024-10-12 07:14:59 -03:00
James Rich
ebe0aeec14
Adds support for known 0 hopsAway (#1295) 2024-10-09 17:04:05 -03:00
andrekir
16e91c0ebf refactor: sync isOnline status with firmware (2 hours) 2024-10-02 17:03:36 -03:00
Andre K
c30ee2f55f
refactor: replace MyNodeInfo with MyNodeEntity (#1277) 2024-10-02 06:18:30 -03:00
andrekir
cca06784fc feat: add PowerMetrics data to nodes telemetry
closes #994
2024-10-01 19:50:03 -03:00
andrekir
717c932ae2 refactor(MeshLog): add fields for query optimization
- Adds `from_num` and `port_num` fields as indices to the `MeshLog` entity to improve query performance.
- Sets default values for new columns for auto-migration and backward compatibility.
2024-09-26 05:55:38 -03:00
andrekir
a075dfbd3a feat: add dialog for message status information 2024-09-24 22:06:15 -03:00
andrekir
22b1cf0f16 feat: add encryption status icon and dialog to node list items 2024-09-23 10:13:27 -03:00
andrekir
587c6c91f4 refactor: ensure backward compatibility for PKC encryption 2024-09-22 23:01:33 -03:00
andrekir
83dc389d6d refactor(NodeItem): replace NodeInfo with NodeEntity 2024-09-21 16:47:20 -03:00
Andre K
396195a1b8
refactor: introduce NodeEntity protobuf-based database entity (#1250) 2024-09-16 17:57:30 -03:00
andrekir
300904d337 chore(detekt): enable UnusedImports rule 2024-08-31 09:00:15 -03:00
Andre K
5b3c78316b
feat: support for switching between devices (#1078) 2024-06-08 10:25:47 -03:00
Andre K
ecaf35d7f3
feat: add ActionMenu option to mute contacts (#1003) 2024-04-28 16:18:16 -03:00
Mike Cumings
e32a1dadea
Annotated debug panel of to/from fields with hex form (#830) 2024-02-02 23:55:41 -03:00
andrekir
7869243290 refactor(config): move business logic to ViewModel 2023-09-17 06:18:46 -03:00
Andre K
da5f1d529d
feat: add traceroute (#620) 2023-04-16 06:16:41 -03:00
andrekir
65e982ddd5 refactor messages to Room database 2022-09-15 22:24:04 -03:00
andrekir
ab7bf4922b create Room database for DataPacket 2022-09-14 01:54:13 -03:00
andrekir
a93d4e1dcd rename Packet to MeshLog 2022-09-13 22:49:38 -03:00
andrekir
8516eea9c5 replace deprecated onActivityResult 2022-08-30 22:20:44 -03:00
Douile
01e24ff6a4
Add position via dragging the recyclerview 2022-08-16 11:46:57 +01:00
Douile
1bdb6bf340
Add drag to re-arrange support for quick chat actions 2022-08-12 15:35:27 +01:00
Douile
7da224a1ce
Store QuickChatActions in the database 2022-08-11 16:43:26 +01:00
Mike Cumings
16d2b2e5f3 CSV export improvements to make it more reliable 2022-02-25 14:14:50 -08:00
Vadim Furman
78a08898fe Save messages in CSV and fix position broadcast 2021-03-17 21:00:01 -07:00
Ludovic Goix
6ec16073c1 Added a debug panel
final
2020-09-26 21:56:52 -04:00