Skip to content

Commit 275c5ec

Browse files
Merge pull request #14304 from nextcloud/bugfix/14288/no-absence-loop-or-break
fix(absence): Don't break when you are the absence or it's recursion
2 parents 617f1f9 + 5931ead commit 275c5ec

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/components/NewMessage/NewMessageAbsenceInfo.vue

+11
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
<script>
4343
import ChevronUp from 'vue-material-design-icons/ChevronUp.vue'
4444

45+
import { getCurrentUser } from '@nextcloud/auth'
4546
import { t } from '@nextcloud/l10n'
4647
import moment from '@nextcloud/moment'
4748

@@ -142,6 +143,16 @@ export default {
142143
},
143144

144145
async openConversationWithReplacementUser() {
146+
if (this.userAbsence.replacementUserId === getCurrentUser().uid) {
147+
// Don't open a chat with one-self
148+
return
149+
}
150+
151+
if (this.userAbsence.replacementUserId === this.userAbsence.userId) {
152+
// Don't recursively go to the current chat
153+
return
154+
}
155+
145156
this.$router.push({
146157
name: 'root',
147158
query: {

0 commit comments

Comments
 (0)