Skip to content

Commit

Permalink
refactor: remove unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
domw30 committed Oct 17, 2023
1 parent d1e4f17 commit 36a8644
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions src/lib/chat/matrix-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -596,34 +596,6 @@ export class MatrixClient implements IChatClient {
};
}

private mapMatrixEventToMessage(matrixEvent) {
if (!matrixEvent || matrixEvent.getType() !== EventType.RoomMessage) return null;

const { body: message } = matrixEvent.getContent();
const senderId = matrixEvent.getSender();
const timestamp = matrixEvent.getTs();
const eventId = matrixEvent.getId();

return {
id: eventId,
message,
isAdmin: false,
createdAt: timestamp,
updatedAt: null,
sender: {
userId: senderId,
firstName: matrixEvent.sender?.name,
lastName: '',
profileImage: '',
profileId: '',
},
mentionedUsers: [],
hidePreview: false,
preview: null,
sendStatus: null,
};
}

private getRoomName(room: Room): string {
const roomNameEvent = this.getLatestEvent(room, EventType.RoomName);
return roomNameEvent?.getContent()?.name || '';
Expand Down

0 comments on commit 36a8644

Please sign in to comment.