forked from element-hq/hydrogen-web
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit 38d61d4 Author: Mirian Margiani <[email protected]> Date: Mon Dec 2 12:59:30 2024 +0100 Hide less important unhandled events from the timeline Signed-off-by: Mirian Margiani <[email protected]> commit 5817d68 Author: Mirian Margiani <[email protected]> Date: Mon Dec 2 12:59:29 2024 +0100 Render unknown events without sender avatar as announcements Signed-off-by: Mirian Margiani <[email protected]> commit 9c7da1c Author: Mirian Margiani <[email protected]> Date: Mon Dec 2 12:59:28 2024 +0100 Render unknown message types This helps users not to miss anything unnoticed. Clearly state that a message is not supported by hydrogen so users can check their messages with a different client. Signed-off-by: Mirian Margiani <[email protected]> commit cd02ef6 Merge: 4ae47c0 58af591 Author: R Midhun Suresh <[email protected]> Date: Mon Oct 21 17:25:32 2024 +0530 Merge pull request element-hq#1190 from element-hq/sdk-release/0.3.1 Changes for sdk-release 0.3.1 commit 58af591 Author: R Midhun Suresh <[email protected]> Date: Mon Oct 21 17:23:57 2024 +0530 Changes for sdk-release 0.3.1
- Loading branch information
Showing
5 changed files
with
106 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
35 changes: 35 additions & 0 deletions
35
src/domain/session/room/timeline/tiles/UnknownEventTile.js
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
Copyright 2024 Mirian Margiani <[email protected]> | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
import {SimpleTile} from "./SimpleTile"; | ||
|
||
export class UnknownEventTile extends SimpleTile { | ||
|
||
get shape() { | ||
return "unknown-event"; | ||
} | ||
|
||
get details() { | ||
const eventType = this._entry.eventType; | ||
const content = this._entry.content; | ||
|
||
if (content.msgtype) { | ||
return this.i18n`This message is not supported by your app (event “${eventType}”, message type “${content.msgtype}”). Please report this issue.` | ||
} else { | ||
return this.i18n`This message is not supported by your app (event “${eventType}”). Please report this issue.` | ||
} | ||
} | ||
} |
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
41 changes: 41 additions & 0 deletions
41
src/platform/web/ui/session/room/timeline/UnknownEventView.js
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
Copyright 2020 Bruno Windels <[email protected]> | ||
Copyright 2024 Mirian Margiani <[email protected]> | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
import {BaseMessageView} from "./BaseMessageView.js"; | ||
import {Menu} from "../../../general/Menu.js"; | ||
|
||
export class UnknownEventView extends BaseMessageView { | ||
render(t, vm) { | ||
if (vm.displayName && vm.avatarUrl) { | ||
super.render(t, vm); | ||
} else { | ||
return t.li({ | ||
className: "AnnouncementView", | ||
'data-event-id': vm.eventId | ||
}, t.div(vm => vm.details)); | ||
} | ||
} | ||
|
||
renderMessageBody(t) { | ||
return t.p({className: "Timeline_messageBody statusMessage"}, vm => vm.details); | ||
} | ||
|
||
createMenuOptions(vm) { | ||
const options = super.createMenuOptions(vm); | ||
return options; | ||
} | ||
} |