This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 829
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3135 from matrix-org/t3chguy/fix_MELS_labs
Add ability to render null-rejoins in Timeline and MELS
- Loading branch information
Showing
3 changed files
with
17 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
/* | ||
Copyright 2016 OpenMarket Ltd | ||
Copyright 2019 The Matrix.org Foundation C.I.C. | ||
Copyright 2019 Michael Telatynski <[email protected]> | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
|
@@ -17,7 +18,6 @@ limitations under the License. | |
|
||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import sdk from '../../../index'; | ||
import MemberAvatar from '../avatars/MemberAvatar'; | ||
import { _t } from '../../../languageHandler'; | ||
import { formatCommaSeparatedList } from '../../../utils/FormattingUtils'; | ||
|
@@ -277,6 +277,11 @@ module.exports = React.createClass({ | |
? _t("%(severalUsers)schanged their avatar %(count)s times", { severalUsers: "", count: repeats }) | ||
: _t("%(oneUser)schanged their avatar %(count)s times", { oneUser: "", count: repeats }); | ||
break; | ||
case "no_change": | ||
res = (userCount > 1) | ||
? _t("%(severalUsers)smade no changes %(count)s times", { severalUsers: "", count: repeats }) | ||
: _t("%(oneUser)smade no changes %(count)s times", { oneUser: "", count: repeats }); | ||
break; | ||
} | ||
|
||
return res; | ||
|
@@ -321,7 +326,7 @@ module.exports = React.createClass({ | |
return 'changed_avatar'; | ||
} | ||
// console.log("MELS ignoring duplicate membership join event"); | ||
return null; | ||
return 'no_change'; | ||
} else { | ||
return 'joined'; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters