[FIX] In some discussions you haven't joined yet, messages are not being loaded. (#4269)

* fix discussions not loadings

* Adds one more layer of verification to get the correct room type
This commit is contained in:
Gleidson Daniel Silva 2022-06-14 13:12:44 -03:00 committed by GitHub
parent fa90e4d456
commit 6b15ace933
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -899,13 +899,15 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
};
onDiscussionPress = debounce(
(item: TAnyMessageModel) => {
async (item: TAnyMessageModel) => {
const { navigation } = this.props;
if (!item.drid) return;
const sub = await getRoomInfo(item.drid);
navigation.push('RoomView', {
rid: item.drid as string,
prid: item.rid,
prid: item?.subscription?.id,
name: item.msg,
t: 'p' as SubscriptionType
t: (sub?.t as SubscriptionType) || (this.t as SubscriptionType)
});
},
1000,