fix/znc-dedup #369

Open
xiangyu wants to merge 3 commits from xiangyu/goguma:fix/znc-dedup into master
First-time contributor

Since the recent removal of Palaver from IOS AppStore, I am looking for a replacement and found this project.

It wasn't working for our server, which uses a self signed unsafe certificate and also requires password. For that purpose I modified the auth logic for allowing the password while using unsafe cert.

Another issue is with the ZNC playback, which duplicates the messages everytime I restart the App.

Thank you for the great work.

Disclaimer of AI usage:
Coworked with Claude Code.

Since the recent removal of [Palaver](https://palaverapp.com/) from IOS AppStore, I am looking for a replacement and found this project. It wasn't working for our server, which uses a self signed unsafe certificate and also requires password. For that purpose I modified the auth logic for allowing the password while using unsafe cert. Another issue is with the ZNC playback, which duplicates the messages everytime I restart the App. Thank you for the great work. Disclaimer of AI usage: Coworked with Claude Code.
Previously the password field was hidden when the server probed as not
supporting SASL PLAIN (e.g. plain IRC servers). This made it impossible
to enter an IRC PASS password via the connect page.

- Always show the password field regardless of server capabilities
- Use SASL PLAIN when the server supports it, otherwise send the
  password via the IRC PASS command

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
database/models: deduplicate messages on reconnect without msgid
All checks were successful
builds.sr.ht/android Job completed
98bef9a02d
ZNC replays its full buffer on every connect. It does not include msgid
tags, so the existing msgid-based dedup logic is bypassed entirely. It
does change the batch tag each session, so the batch tag cannot be used
as an identity either.

Fix by deduplicating on a content key of (buffer, time, source+cmd+params),
which is stable across reconnects and ignores the per-session batch tag:

- In storeMessages(): for messages without networkMsgid, query by
  (buffer, time) and compare content keys before inserting
- In BufferModel.addMessages(): filter in-memory duplicates using a
  parallel _messagesByContentKey map (alongside the existing
  _messagesByNetworkMsgid map)
- Add DB migrations to remove existing duplicates accumulated from
  prior reconnects, both msgid-based and content-based

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
xiangyu force-pushed fix/znc-dedup from 98bef9a02d
All checks were successful
builds.sr.ht/android Job completed
to 1739d66050
All checks were successful
builds.sr.ht/android Job completed
2026-06-14 11:38:06 +02:00
Compare
Author
First-time contributor

Added a commit for handling znc.in/playback messages otherwise the full znc playback flushes the UI on app start.

Added a commit for handling znc.in/playback messages otherwise the full znc playback flushes the UI on app start.
All checks were successful
builds.sr.ht/android Job completed
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u fix/znc-dedup:xiangyu-fix/znc-dedup
git switch xiangyu-fix/znc-dedup

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff xiangyu-fix/znc-dedup
git switch xiangyu-fix/znc-dedup
git rebase master
git switch master
git merge --ff-only xiangyu-fix/znc-dedup
git switch xiangyu-fix/znc-dedup
git rebase master
git switch master
git merge --no-ff xiangyu-fix/znc-dedup
git switch master
git merge --squash xiangyu-fix/znc-dedup
git switch master
git merge --ff-only xiangyu-fix/znc-dedup
git switch master
git merge xiangyu-fix/znc-dedup
git push origin master
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
emersion/goguma!369
No description provided.