Skip to content

Conversation

@jrainville
Copy link
Member

Fixes status-im/status-app#19343

Enables users to backup and sync emoji reactions along with messages during a pairing.

emoji-backup.webm

@status-im-auto
Copy link
Member

status-im-auto commented Nov 28, 2025

Jenkins Builds

Click to see older builds (16)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 137d14e #1 2025-11-28 20:32:57 ~3 min linux/status-go 📦zip
✔️ 137d14e #1 2025-11-28 20:33:13 ~4 min macos/status-go 📦zip
✔️ 137d14e #1 2025-11-28 20:35:06 ~5 min windows/status-go 📦zip
✔️ 137d14e #1 2025-11-28 20:40:48 ~11 min linux/nwaku 📦zip
✔️ 137d14e #1 2025-11-28 20:42:00 ~12 min tests-rpc 📄log
✔️ 137d14e #1 2025-11-28 20:56:30 ~27 min tests 📄log
✔️ 332cf3c #2 2025-11-28 21:06:44 ~3 min linux/status-go 📦zip
✔️ 332cf3c #2 2025-11-28 21:06:47 ~3 min macos/status-go 📦zip
✔️ 332cf3c #2 2025-11-28 21:08:55 ~5 min windows/status-go 📦zip
✔️ 332cf3c #2 2025-11-28 21:14:27 ~11 min linux/nwaku 📦zip
✔️ 332cf3c #2 2025-11-28 21:15:41 ~12 min tests-rpc 📄log
✔️ 332cf3c #2 2025-11-28 21:29:35 ~26 min tests 📄log
332cf3c #1 2025-12-01 11:17:17 ~7 min macos/nwaku 📄log
332cf3c #1 2025-12-01 11:39:10 ~13 min windows/nwaku 📄log
✔️ 332cf3c #1 2025-12-01 12:39:51 ~27 min tests 📄log
✖️ 332cf3c #1 2025-12-01 13:10:33 ~41 min tests-rpc 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ b2c8f71 #3 2025-12-03 16:12:52 ~3 min linux/status-go 📦zip
✔️ b2c8f71 #3 2025-12-03 16:16:49 ~7 min windows/status-go 📦zip
✔️ b2c8f71 #3 2025-12-03 16:18:33 ~9 min linux/nwaku 📦zip
✔️ b2c8f71 #4 2025-12-03 16:22:35 ~9 min linux/status-go 📦zip
b2c8f71 #2 2025-12-03 16:23:03 ~13 min windows/nwaku 📄log
✔️ b2c8f71 #2 2025-12-03 16:31:25 ~22 min tests-rpc 📄log
✔️ b2c8f71 #3 2025-12-03 16:32:04 ~22 min tests-rpc 📄log
✔️ b2c8f71 #2 2025-12-03 16:40:42 ~31 min tests 📄log
✔️ b2c8f71 #3 2025-12-03 16:44:42 ~35 min tests 📄log
✖️ b0c7910 #4 2025-12-11 16:40:00 ~3 min tests-rpc 📄log
✔️ b0c7910 #5 2025-12-11 16:40:31 ~4 min linux/status-go 📦zip
✔️ b0c7910 #4 2025-12-11 16:41:07 ~4 min macos/status-go 📦zip
✔️ b0c7910 #4 2025-12-11 16:41:41 ~5 min windows/status-go 📦zip
✖️ b0c7910 #4 2025-12-11 16:43:47 ~7 min tests 📄log
✔️ b0c7910 #4 2025-12-11 16:45:00 ~8 min linux/nwaku 📦zip
✔️ b0c7910 #3 2025-12-11 16:45:30 ~9 min macos/nwaku 📦zip
b0c7910 #3 2025-12-11 16:53:22 ~16 min windows/nwaku 📄log
✔️ b0c7910 #3 2025-12-11 17:06:32 ~30 min tests 📄log

@codecov
Copy link

codecov bot commented Nov 28, 2025

Codecov Report

❌ Patch coverage is 76.50000% with 47 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.99%. Comparing base (0d65c25) to head (b2c8f71).
⚠️ Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
protocol/message_persistence.go 76.50% 33 Missing and 14 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #7163       +/-   ##
============================================
+ Coverage    35.00%   59.99%   +24.98%     
============================================
  Files          798      813       +15     
  Lines       111323   113508     +2185     
============================================
+ Hits         38972    68098    +29126     
+ Misses       67476    38566    -28910     
- Partials      4875     6844     +1969     
Flag Coverage Δ
functional 35.07% <50.50%> (+0.06%) ⬆️
unit 55.53% <76.50%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
protocol/message_persistence.go 71.18% <76.50%> (+24.06%) ⬆️

... and 517 files with indirect coverage changes

@jrainville jrainville force-pushed the feat/backup-emoji-reactions branch from 137d14e to 332cf3c Compare November 28, 2025 21:02
LEFT JOIN pin_messages pm
ON pm.message_id = m1.id AND pm.pinned = 1
LEFT JOIN emoji_reactions e
ON e.message_id = m1.id AND NOT(e.retracted)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't AND NOT(e.retracted) be after WHERE? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess both work. This makes it clear that it's a condition only on the emoji_reactions. Especially since the query is already a bit confusing, since it fetches the same message multiple times for the reactions.


rows, err := db.db.Query(query)
if err != nil {
if err == sql.ErrNoRows {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if err == sql.ErrNoRows {
if errors.Is(err, sql.ErrNoRows) {

@jrainville jrainville force-pushed the feat/backup-emoji-reactions branch 2 times, most recently from 0c4b472 to b2c8f71 Compare December 3, 2025 16:08
@jrainville jrainville force-pushed the feat/backup-emoji-reactions branch from b2c8f71 to b0c7910 Compare December 11, 2025 16:35
@jrainville
Copy link
Member Author

@osmaczko friendly reminder to review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[On-device backup] backup emoji reactions on messages

3 participants