diff --git a/package.json b/package.json index 1ec562d2..38c970d9 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,7 @@ "react-virtuoso": "^1.10.4", "redux": "^4.1.0", "revolt-api": "0.5.3-alpha.0-patch.0", - "revolt.js": "5.1.0-alpha.0-patch.1", + "revolt.js": "5.1.0-alpha.1", "rimraf": "^3.0.2", "sass": "^1.35.1", "shade-blend-color": "^1.0.0", diff --git a/src/components/navigation/items/ButtonItem.tsx b/src/components/navigation/items/ButtonItem.tsx index ae38ba54..1f7d274c 100644 --- a/src/components/navigation/items/ButtonItem.tsx +++ b/src/components/navigation/items/ButtonItem.tsx @@ -82,8 +82,9 @@ export const UserButton = observer((props: UserProps) => { {
- {channel?.last_message && alert ? ( - (channel.last_message as { short: string }).short + {typeof channel?.last_message?.content === "string" && + alert ? ( + channel.last_message.content.slice(0, 32) ) : ( )} @@ -162,8 +163,9 @@ export const ChannelButton = observer((props: ChannelProps) => {
{channel.name}
{channel.channel_type === "Group" && (
- {channel.last_message && alert ? ( - (channel.last_message as { short: string }).short + {typeof channel.last_message?.content === "string" && + alert ? ( + channel.last_message.content.slice(0, 32) ) : (