Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing federated acceptance messages #4086

Merged

Conversation

rapterjet2004
Copy link
Contributor

@rapterjet2004 rapterjet2004 commented Aug 15, 2024

🖼️ Screenshots

🏚️ Before 🏡 After
Screenshot 2024-08-15 at 10 39 03 AM Screenshot 2024-08-15 at 10 37 06 AM

🏁 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 added 3. to review Waiting for reviews feature: 🗨️ chat feature: 🌐 federation Support for federated conversations labels Aug 15, 2024
@rapterjet2004 rapterjet2004 self-assigned this Aug 15, 2024
@@ -3371,7 +3369,7 @@ class ChatActivity :
CONTENT_TYPE_VOICE_MESSAGE -> message.isVoiceMessage
CONTENT_TYPE_POLL -> message.isPoll()
CONTENT_TYPE_LINK_PREVIEW -> message.isLinkPreview()
CONTENT_TYPE_SYSTEM_MESSAGE -> !TextUtils.isEmpty(message.systemMessage)
CONTENT_TYPE_SYSTEM_MESSAGE -> message.messageType == "system"

Choose a reason for hiding this comment

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

Any idea why the previous check did not work? Because systemMessage should not be empty in this case?
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh, I see, seems that the federated_user_added and federated_user_removed weren't added to the system message type enum. Should be fixed properly now.

Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
@rapterjet2004 rapterjet2004 force-pushed the issue-4072-federated-accept-message-should-be-system branch from 0c310dc to 7ca68b3 Compare August 15, 2024 16:29
Copy link
Contributor

Codacy

Lint

TypemasterPR
Warnings9087
Errors129132

SpotBugs

CategoryBaseNew
Bad practice66
Correctness1111
Dodgy code7878
Internationalization33
Malicious code vulnerability33
Performance66
Security11
Total108108

Lint increased!

Copy link

@SystemKeeper SystemKeeper left a comment

Choose a reason for hiding this comment

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

Seems to work fine now 👍
But please change the commit message to a more descriptive commit message before merging 😉

@rapterjet2004 rapterjet2004 merged commit bb64e04 into master Aug 21, 2024
17 of 18 checks passed
@rapterjet2004 rapterjet2004 deleted the issue-4072-federated-accept-message-should-be-system branch August 21, 2024 13:36
Copy link
Contributor

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/4086-talk.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 Talk app.

@rapterjet2004
Copy link
Contributor Author

/backport to stable-20.0

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 feature: 🗨️ chat feature: 🌐 federation Support for federated conversations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

System messages related to federated invites are rendered as user messages
2 participants