fix for message now showing up in channel list for sealed topics

This commit is contained in:
balzack 2025-01-12 00:15:06 -08:00
parent 7660dcc980
commit 40bc0b8464
5 changed files with 9 additions and 7 deletions

View File

@ -122,8 +122,8 @@ export function useContent() {
}
} else if (lastTopic.dataType === 'sealedtopic') {
if (lastTopic.data) {
if (lastTopic.data.message?.text) {
return lastTopic.data.message.text;
if (lastTopic.data?.text) {
return lastTopic.data.text;
} else {
return '';
}

View File

@ -125,8 +125,8 @@ export function useContent() {
}
} else if (lastTopic.dataType === 'sealedtopic') {
if (lastTopic.data) {
if (lastTopic.data.message?.text) {
return lastTopic.data.message.text
if (lastTopic.data?.text) {
return lastTopic.data.text
} else {
return ''
}

View File

@ -11,7 +11,7 @@ export function useProfile(params: ProfileParams) {
const [state, setState] = useState({
strings: display.state.strings,
cards: [] as Card[],
profile: {} as {} | Profile,
profile: {guid:''} as {guid:string} | Profile,
guid: '',
name: '',
handle: '',

View File

@ -1031,6 +1031,7 @@ export class ContactModule implements Contact {
const channelData = detail.sealed ? item.unsealedDetail : detail.data || '{}';
const topicData = summary.sealed ? item.unsealedSummary : summary.data || '{}';
const parsed = this.parse(topicData);
const data = summary.sealed ? parsed?.message : parsed;
return {
channelId,
@ -1039,7 +1040,7 @@ export class ContactModule implements Contact {
guid: summary.guid,
sealed: summary.sealed,
dataType: summary.dataType,
data: getLegacyData(parsed).data,
data: getLegacyData(data).data,
created: summary.created,
updated: summary.updated,
status: summary.status,

View File

@ -558,6 +558,7 @@ export class StreamModule {
const channelData = detail.sealed ? item.unsealedDetail : detail.data || '{}';
const topicData = summary.sealed ? item.unsealedSummary : summary.data || '{}';
const parsed = this.parse(topicData);
const data = summary.sealed ? parsed?.message : parsed;
return {
channelId,
@ -566,7 +567,7 @@ export class StreamModule {
guid: summary.guid,
sealed: summary.sealed,
dataType: summary.dataType,
data: getLegacyData(parsed).data,
data: getLegacyData(data).data,
created: summary.created,
updated: summary.updated,
status: summary.status,