forked from Ivasoft/mattermost-mobile
Fix update lastPostAt (#6154)
This commit is contained in:
@@ -358,6 +358,8 @@ export async function updateLastPostAt(serverUrl: string, channelId: string, las
|
||||
} catch (error) {
|
||||
return {error};
|
||||
}
|
||||
|
||||
return {member};
|
||||
}
|
||||
|
||||
return {member: undefined};
|
||||
|
||||
@@ -131,6 +131,10 @@ export async function createPost(serverUrl: string, post: Partial<Post>, files:
|
||||
posts: [created],
|
||||
prepareRecordsOnly: true,
|
||||
});
|
||||
const {member} = await updateLastPostAt(serverUrl, created.channel_id, created.create_at, true);
|
||||
if (member) {
|
||||
models.push(member);
|
||||
}
|
||||
if (isCRTEnabled) {
|
||||
const {models: threadModels} = await createThreadFromNewPost(serverUrl, created, true);
|
||||
if (threadModels?.length) {
|
||||
|
||||
Reference in New Issue
Block a user