Skip to content

Conversation

@existentialcoder
Copy link

@existentialcoder existentialcoder commented Jan 8, 2026

☑️ Resolves

🖌️ UI Checklist

🖼️ Screenshots / Screencasts

🏚️ Before 🏡 After
Personal
image
Group
image |

🏁 Checklist

  • 🌏 Tested with different browsers / clients:
    • Chromium (Chrome / Edge / Opera / Brave)
    • Firefox
    • Safari
    • Talk Desktop
    • Integrations with Files sidebar and other apps
    • Not risky to browser differences / client
  • 🖌️ Design was reviewed, approved or inspired by the design team
  • ⛑️ Tests are included or not possible
  • 📗 User documentation in https://github.com/nextcloud/documentation/tree/master/user_manual/talk has been updated or is not required

<LobbyStatus v-if="canFullModerate && hasLobbyEnabled" :token="token" />
<div v-if="isMessageExpirationSet && !isOneToOne" class="group-message-expiration">
<IconClockOutline :size="16" />
<span>{{ t('spreed', 'Message expiration is set to {date}', { date: messageExpirationDate }) }} </span>
Copy link
Member

Choose a reason for hiding this comment

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

instead of calculating a random date that would need live updating, I would show something like: "Message expiration is set to 30 minutes"

Copy link
Author

Choose a reason for hiding this comment

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

That is rather the actual expiration timestamp coming from conversation.lastMessage.expirationTimestamp. Should we still replace it in terms of number of minutes / hours / days?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, it should indicate duration

@existentialcoder existentialcoder changed the title Iss 16659 feat(message-expiry): Add message expiry msg on the right side bar Jan 8, 2026
Signed-off-by: Shravan Balasubramanian <shravanayyappa@gmail.com>
Comment on lines +144 to +150
if (props.isMessageExpirationSet) {
fields.push({
key: 'message-expiry',
icon: IconDeleteClockOutline,
label: t('spreed', 'Message expiration is set to {date}', { date: props.messageExpirationDate }),
})
}
Copy link
Contributor

@Antreesy Antreesy Jan 9, 2026

Choose a reason for hiding this comment

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

This part should be enough, the whole logic doesn't belong to RightSidebar.vue, and does not need props to be passed. We already have a conversation object here, maybe just need to be rearranged:

const profileInformation = computed(() => {
	const fields = []

	if (profileInfo.value?.role || profileInfo.value?.pronouns) {
		...
	if (profileInfo.value?.organisation || profileInfo.value?.address) {
		...
	if (conversation.value.messageExpiration) {
		fields.push({
			key: 'message-expiry',
			icon: IconDeleteClockOutline,
			label: t('spreed', 'Message expiration set: {duration}', { duration: expiration.label }),
		})
	}

	return fields
}

duration string can be composed from strings here

{ id: 3600, label: n('spreed', '%n hour', '%n hours', 1) },
{ id: 28800, label: n('spreed', '%n hour', '%n hours', 8) },
{ id: 86400, label: n('spreed', '%n day', '%n days', 1) },
{ id: 604800, label: n('spreed', '%n week', '%n weeks', 1) },
{ id: 2419200, label: n('spreed', '%n week', '%n weeks', 4) },
{ id: 0, label: t('spreed', 'Off') },

'Message expiration set: {duration}' is already existing and translated string, so we e.g. can backport it to older versions right away

this.notifyUnreadMessages(null)
// FIXME collapse for group conversations until we show anything useful there
this.contentModeIndex = this.isOneToOne ? 1 : 0
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the place, thanks for finding

Copy link
Contributor

Choose a reason for hiding this comment

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

IMO although it's good to have a test coverage, it doesn't worth it in this case. Efforts to write / review tests for this exceed the implementation of the feature, that should be just a piece on top of already working code

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chat should permanently indicate whether message expiration is set up

3 participants