Skip to content

📣 Adding Announcements and Channels - #6416

Open
rapterjet2004 wants to merge 9 commits into
masterfrom
issue-6415-accouncements-channels
Open

📣 Adding Announcements and Channels#6416
rapterjet2004 wants to merge 9 commits into
masterfrom
issue-6415-accouncements-channels

Conversation

@rapterjet2004

@rapterjet2004 rapterjet2004 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor
Screenshot 2026-08-03 at 11 29 58 AM

🚧 TODO

  • test channel usage
  • test channel creation - doesn't seem to be working right. (Didn't set permissions right)
  • test announcements

🏁 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?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@rapterjet2004 rapterjet2004 self-assigned this Jul 17, 2026
@rapterjet2004 rapterjet2004 added the 2. developing Work in progress label Jul 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

APK file: https://github.com/nextcloud/talk-android/actions/runs/30644556404/artifacts/8799264492
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@rapterjet2004
rapterjet2004 requested a review from mahibi August 3, 2026 16:52
@rapterjet2004 rapterjet2004 added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

APK file: https://github.com/nextcloud/talk-android/actions/runs/30834160916/artifacts/8864465159
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@mahibi
mahibi force-pushed the issue-6415-accouncements-channels branch from ad99f1d to a50d4bc Compare August 5, 2026 15:47
@mahibi

mahibi commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

rebased, resolved some merge conflicts and added some commits to unify how/where the bitwise and capabilities checks are done.

Not yet finished with reviewing but i for now i got these points:

  • "admin only" for Announcements means that only admins of the instance should be able to create it. I was logged in without admin rights and could see the option in the "new conversation" screen.

  • According to 📣 Overview: Announcement and Channel presets spreed#18683 (comment) please remove the admin label and change the description instead

  • if i was granted the chat permission, wrote something, and then the permission was revoked, do not offer the edit message option.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

APK file: https://github.com/nextcloud/talk-android/actions/runs/31022064020/artifacts/8939554324
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

_conversationDescription.value = conversationDescription
}

fun updateConversationPreset(preset: String) {

@mahibi mahibi Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • default and voice room also need to be handled here to set the correct values.

Otherwise when switching between the presets the values get sometimes set and sometimes not.

rapterjet2004 and others added 9 commits August 6, 2026 13:10
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Adds isClassifiedAttribute() next to isChannel()/isAnnouncement() on
ConversationModel, and has ConversationUtils.isClassified() compose it
instead of re-deriving the attribute bitmask check. The Conversation
(json model) overload is kept for CallActivity but marked deprecated
in favor of the ConversationModel one.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
…tionUtils

checkIfVoiceRoom()/isChannel()/isAnnouncement()/isClassifiedAttribute()
were declared on ConversationModel even though every other "does this
conversation satisfy X" predicate already lives in ConversationUtils.
Keeps the extension-function call syntax at all call sites, only the
import path changes. ConversationModel keeps mapToConversationModel(),
which is model construction rather than a business-rule predicate.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
isChannel() was a raw attribute check, so every caller had to repeat
"conversation.isChannel() && hasSpreedFeatureCapability(..., ANNOUNCEMENT_PRESET)"
themselves. Renamed the raw checks to isChannelAttribute()/
isAnnouncementAttribute() (mirroring isClassifiedAttribute()) and added
a capability-gated isChannel(conversation, spreedCapabilities), mirroring
the existing isClassified()/isClassifiedAttribute() split. Callers now
call ConversationUtils.isChannel(...) directly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
spreedCapabilities was only needed inside the terminal map step of
messagesFlow (to filter system messages for channels), but it was
being combined into the outer flatMapLatest trigger. Any capabilities
emission unrelated to the conversation forced the whole message
source subscription to cancel and restart.

Move the capabilities dependency to a dedicated isChannelFlow
(conversationAndUserFlow + spreedCapabilities -> Boolean, with
distinctUntilChanged), and combine only that into the innermost step.
handleSystemMessages() now takes a plain Boolean instead of
ConversationModel/SpreedCapability, making it simpler to reason about
and test.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@mahibi
mahibi force-pushed the issue-6415-accouncements-channels branch from 69bae84 to 6e9afaa Compare August 6, 2026 11:11
@mahibi

mahibi commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

@rapterjet2004 please have a look at my commits and let me know if something is wrong/unclear in your opinion.

Besides the points that i mentioned above it look good.

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 AI assisted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

📣 Android: Announcement and Channel presets

2 participants