Skip to content

Commit

Permalink
fix images
Browse files Browse the repository at this point in the history
  • Loading branch information
targoninc-alex committed Jun 1, 2024
1 parent 61fa103 commit 0b4ba2f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ui/components/channel.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ export class ChannelTemplates {
const activeClass = computedSignal(activeChannel, id => {
return id === channel.id ? "active" : "_";
});
const lastMemberAvatar = channel.members.at(-1)?.avatar;
let lastMemberAvatar = channel.members.at(-1)?.avatar;
if (channel.type === "dm") {
lastMemberAvatar = channel.members.find(member => member.id !== store().get("user").value.id)?.avatar ?? testImage;
}

return create("div")
.classes("channel", "flex", "no-wrap", "full-width", activeClass)
Expand Down

0 comments on commit 0b4ba2f

Please sign in to comment.