Skip to content

Commit

Permalink
add room name in exported filename
Browse files Browse the repository at this point in the history
  • Loading branch information
estellecomment committed Aug 24, 2023
1 parent d36f930 commit f4c8ad3
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/node_modules/matrix-react-sdk/src/components/views/rooms/MemberList.tsx b/node_modules/matrix-react-sdk/src/components/views/rooms/MemberList.tsx
index 44dba2e..e0521de 100644
index 44dba2e..bb9f1b1 100644
--- a/node_modules/matrix-react-sdk/src/components/views/rooms/MemberList.tsx
+++ b/node_modules/matrix-react-sdk/src/components/views/rooms/MemberList.tsx
@@ -39,6 +39,7 @@ import TruncatedList from "../elements/TruncatedList";
Expand Down Expand Up @@ -56,7 +56,7 @@ index 44dba2e..e0521de 100644
</React.Fragment>
}
footer={footer}
@@ -443,4 +462,18 @@ export default class MemberList extends React.Component<IProps, IState> {
@@ -443,4 +462,22 @@ export default class MemberList extends React.Component<IProps, IState> {
roomId: this.props.roomId,
});
};
Expand All @@ -66,9 +66,13 @@ index 44dba2e..e0521de 100644
+ const members = this.state.filteredJoinedMembers.map(roomMember => roomMember.userId);
+ const blob = new Blob(members, { type : 'plain/text' })
+
+ const cli = MatrixClientPeg.get();
+ const room = cli.getRoom(this.props.roomId);
+ const normalizedName = room.normalizedName;
+
+ this.downloader.download({
+ blob: blob,
+ name: "membres.txt", // todo add room name
+ name: "membres_de_" + normalizedName + ".txt", // todo translate this
+ });
+
+ return;
Expand Down

0 comments on commit f4c8ad3

Please sign in to comment.