prose-im / prose-app-web

Prose Web application. XMPP client for team messaging.
https://prose.org/downloads
Mozilla Public License 2.0
25 stars 2 forks source link

Unread stack doesn't work for anonymous MUCs #124

Open nesium opened 4 months ago

nesium commented 4 months ago
Screenshot 2024-07-05 at 11 53 37

Exception message is

Could not load unread message excerpts for room: berlin-meetup@conference.conversations.im Error: resource found while parsing a bare JID

The reason is that makeUnreadMessageExcerpt tries to convert a FullJid into a BareJid…

    makeUnreadMessageExcerpt({
      id,
      from,
      name,
      content,
      date
    }: {
      id: string;
      from: string;
      name?: string;
      content: string;
      date: Date;
    }): UnreadMessageExcerpt {
      return {
        id: id,
        jid: new JID(from),
        name: name || from,
        preview: content,
        timeAgo: this.$filters.date.timeAgo(date.getTime(), true)
      };
    },