mirror of
https://github.com/balzack/databag.git
synced 2025-04-23 10:05:19 +00:00
fix for message now showing up in channel list for sealed topics
This commit is contained in:
parent
7660dcc980
commit
40bc0b8464
@ -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 '';
|
||||
}
|
||||
|
@ -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 ''
|
||||
}
|
||||
|
@ -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: '',
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user