Rich message rendering #24
1 changed files with 1 additions and 1 deletions
|
@ -6,7 +6,7 @@ function createMembershipEvent(membership, message) {
|
||||||
return simpleEvent((e) => e.type == "m.room.member" && e.content.membership === membership, message)
|
return simpleEvent((e) => e.type == "m.room.member" && e.content.membership === membership, message)
|
||||||
bad marked this conversation as resolved
Outdated
|
|||||||
}
|
}
|
||||||
|
|
||||||
const JoinedEvent = createMembershipEvent("join", (e) => {console.log(e); return "joined the room"})
|
const JoinedEvent = createMembershipEvent("join", (e) => "joined the room")
|
||||||
const InvitedEvent = createMembershipEvent("invite", (e) => `invited ${e.content.displayname} the room`)
|
const InvitedEvent = createMembershipEvent("invite", (e) => `invited ${e.content.displayname} the room`)
|
||||||
const LeaveEvent = createMembershipEvent("leave", () => "left the room")
|
const LeaveEvent = createMembershipEvent("leave", () => "left the room")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue
Again here. I think a better way would be to have a base class like MembershipEvent, and then for each kind of membership we subclass it and only implement the canRender method on each.