Skip to content

Commit

Permalink
fix: unread stack message formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriansaliou committed Aug 15, 2024
1 parent 42e7cd1 commit 6b3419b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/views/app/spotlight/AppSpotlightUnread.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ layout-view(
<script lang="ts">
// NPM
import { shallowRef } from "vue";
import { JID, Room, RoomID, SidebarItem } from "@prose-im/prose-sdk-js";
import {
JID,
Room,
RoomID,
SidebarItem,
Message as CoreMessage
} from "@prose-im/prose-sdk-js";

// PROJECT: ASSEMBLIES
import {
Expand Down Expand Up @@ -304,15 +310,15 @@ export default {
return message.id ? true : false;
})
.slice(-excerptsCount)
.map(message => {
.map((message: CoreMessage) => {
// Generate message excerpt data
// Notice: message definitely has an identifier set there, since \
// we filtered out messages with empty identifiers earlier on.
return this.makeUnreadMessageExcerpt({
id: message.id || "",
from: message.from,
name: message.user.name,
content: message.content,
content: message.rawContent,
date: message.date
});
});
Expand Down

0 comments on commit 6b3419b

Please sign in to comment.