What you do is more important than what you are

I feel so philosophical today.

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2020-09-23 09:03:10 +02:00
Родитель 394f832110
Коммит 54a790d375
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 7076EA9751AACDDA
1 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -117,14 +117,6 @@ export default {
* @returns {number}
*/
sortParticipants(participant1, participant2) {
const moderatorTypes = [PARTICIPANT.TYPE.OWNER, PARTICIPANT.TYPE.MODERATOR, PARTICIPANT.TYPE.GUEST_MODERATOR]
const moderator1 = moderatorTypes.indexOf(participant1.participantType) !== -1
const moderator2 = moderatorTypes.indexOf(participant2.participantType) !== -1
if (moderator1 !== moderator2) {
return moderator1 ? -1 : 1
}
let session1 = participant1.sessionId
let session2 = participant2.sessionId
if (participant1.status === 'offline') {
@ -141,6 +133,14 @@ export default {
return -1
}
const moderatorTypes = [PARTICIPANT.TYPE.OWNER, PARTICIPANT.TYPE.MODERATOR, PARTICIPANT.TYPE.GUEST_MODERATOR]
const moderator1 = moderatorTypes.indexOf(participant1.participantType) !== -1
const moderator2 = moderatorTypes.indexOf(participant2.participantType) !== -1
if (moderator1 !== moderator2) {
return moderator1 ? -1 : 1
}
const participant1Away = this.isNotAvailable(participant1)
const participant2Away = this.isNotAvailable(participant2)
if (participant1Away !== participant2Away) {