Skip to content

Conversation

@rapterjet2004
Copy link
Contributor

@rapterjet2004 rapterjet2004 commented Nov 4, 2025

Note: The CI/CD check seems to be broken

Header Header Header
Screenshot 2026-01-15 at 11 19 17 AM Screenshot 2026-01-15 at 11 19 43 AM Screenshot 2026-01-15 at 11 25 49 AM

Features

  • tapping on a shared pinned item opens up the context chat window for that message
  • tapping on the unpin icon unpins the message
  • Message pinning/unpinning from message actions
  • Message unpinning/dismissal/viewing from pinned menu actions
  • Custom pinned message time limit
  • Large pinned messages are scrollable
  • Pinned messages are reactive to server side changes, state changes on other clients are reflected in the opened application in real time

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

@rapterjet2004 rapterjet2004 self-assigned this Nov 4, 2025
@rapterjet2004 rapterjet2004 added the 2. developing Work in progress label Nov 4, 2025
@rapterjet2004 rapterjet2004 marked this pull request as ready for review November 17, 2025 16:15
@rapterjet2004 rapterjet2004 force-pushed the issue-5534-message-pinning branch from 32d678e to 9a043b0 Compare November 19, 2025 13:36
@rapterjet2004 rapterjet2004 added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Nov 21, 2025
@mahibi mahibi added this to the 23.0.0 milestone Nov 27, 2025
@mahibi
Copy link
Collaborator

mahibi commented Nov 27, 2025

@rapterjet2004 as there is a chance that checks succeed now, can you rebase? Might be there will some merge conflicts..

Copy link
Collaborator

@mahibi mahibi left a comment

Choose a reason for hiding this comment

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

just rejecting for now to not merge before a potential v22.1.0 branchoff...

@rapterjet2004 rapterjet2004 force-pushed the issue-5534-message-pinning branch from 27d4daa to 0a1c0e8 Compare December 1, 2025 14:40
@rapterjet2004 rapterjet2004 requested a review from mahibi December 2, 2025 14:42
mahibi

This comment was marked as resolved.

sowjanyakch

This comment was marked as resolved.

@mahibi mahibi modified the milestones: 22.1.0, 23.0.0 Dec 18, 2025
@rapterjet2004 rapterjet2004 force-pushed the issue-5534-message-pinning branch from 0a1c0e8 to 93ae440 Compare December 22, 2025 20:15
@rapterjet2004 rapterjet2004 force-pushed the issue-5534-message-pinning branch from eb15b60 to 98bb053 Compare December 30, 2025 14:16
@mahibi

This comment was marked as resolved.

Copy link
Collaborator

@mahibi mahibi left a comment

Choose a reason for hiding this comment

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

see comments

@rapterjet2004
Copy link
Contributor Author

  • if possible, make it reactive to directly show updated pinned messages whenever they change (when system message is received). right now, when a change is done on web, it's just updated when reloading the chat or waiting for the next pull.

  • on web, there is a pin shown inside the chat for the pinned messages. would be nice to also have this for mobiles.

grafik

I don't think the first is possible without a significant refactoring, the second would require changing a lot of viewHolders, and would be better off implemented in another PR

@rapterjet2004 rapterjet2004 requested a review from mahibi January 12, 2026 17:29
@rapterjet2004 rapterjet2004 force-pushed the issue-5534-message-pinning branch from 63a59aa to ea15088 Compare January 14, 2026 16:29
sowjanyakch

This comment was marked as resolved.

@rapterjet2004 rapterjet2004 force-pushed the issue-5534-message-pinning branch from 41b4d04 to df653b7 Compare January 15, 2026 17:52
@mahibi
Copy link
Collaborator

mahibi commented Jan 16, 2026

  • if possible, make it reactive to directly show updated pinned messages whenever they change (when system message is received). right now, when a change is done on web, it's just updated when reloading the chat or waiting for the next pull.
  • on web, there is a pin shown inside the chat for the pinned messages. would be nice to also have this for mobiles.
grafik

I don't think the first is possible without a significant refactoring, the second would require changing a lot of viewHolders, and would be better off implemented in another PR

okay lets postpone this until we migrated to Compose

- ChatMessage now has ChatMessageMetaData
- Conversation now has updated fields from server
- Added PinnedMessageOptionsDialog
- Added as type to Shared Items
- API, viewmodel, class functions

Signed-off-by: rapterjet2004 <[email protected]>
@mahibi mahibi force-pushed the issue-5534-message-pinning branch from df653b7 to b9acff0 Compare January 16, 2026 08:51
@mahibi
Copy link
Collaborator

mahibi commented Jan 16, 2026

i will merge it and further bugs can be solved with follow ups.

  • issue with authors (for a follow up PR):
  1. pin as user 1
  2. in the same conversation, pin an other message as user 2

bug: message 2 is shown, but user1 is shown as author

@github-actions
Copy link
Contributor

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/5535.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@github-actions
Copy link
Contributor

Codacy

Lint

TypemasterPR
Warnings100102
Errors00

SpotBugs

CategoryBaseNew
Bad practice66
Correctness1010
Dodgy code5454
Internationalization33
Malicious code vulnerability33
Performance44
Security11
Total8181

Lint increased!

@mahibi mahibi merged commit 9fc15b5 into master Jan 16, 2026
14 of 17 checks passed
@mahibi mahibi deleted the issue-5534-message-pinning branch January 16, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Message Pinning 📌

4 participants