[Gekidou] [MM-43973] Thread footer for recent mentions (#6225)

* Displaying thread footer

* Participants can be empty

* Update thread.ts
This commit is contained in:
Anurag Shivarathri
2022-05-05 21:03:09 +05:30
committed by GitHub
parent 83c2cfff97
commit 1760b75dbf
7 changed files with 50 additions and 20 deletions

View File

@@ -14,7 +14,7 @@ import {ActionType, Events, Screens} from '@constants';
import DatabaseManager from '@database/manager';
import {getChannelById, getMyChannel} from '@queries/servers/channel';
import {getPostById} from '@queries/servers/post';
import {getCurrentChannelId, getCurrentUserId} from '@queries/servers/system';
import {getCurrentChannelId, getCurrentTeamId, getCurrentUserId} from '@queries/servers/system';
import {getIsCRTEnabled} from '@queries/servers/thread';
import EphemeralStore from '@store/ephemeral_store';
import {isTablet} from '@utils/helpers';
@@ -239,7 +239,11 @@ export async function handlePostDeleted(serverUrl: string, msg: WebSocketMessage
const channel = await getChannelById(database, post.channel_id);
if (channel) {
fetchThread(serverUrl, channel.teamId, post.root_id);
let {teamId} = channel;
if (!teamId) {
teamId = await getCurrentTeamId(database); // In case of DM/GM
}
fetchThread(serverUrl, teamId, post.root_id);
}
}
}