[Gekidou] retry post (#6293)

* Add try again functionality to failed posts

* Fix attach files on Android

* feedback review

* Prevent android crash when uploading files for the first time

* Update the timestamp for updateAt when retrying to post

* Add POST TIME TO FAIL

* use function isPostFailed
This commit is contained in:
Elias Nahum
2022-05-20 13:23:19 -04:00
committed by GitHub
parent 502efbcdc0
commit e883186fde
10 changed files with 152 additions and 15 deletions

View File

@@ -155,4 +155,25 @@ export default class PostModel extends Model implements PostModelInterface {
return false;
}
toApi = async (): Promise<Post> => ({
id: this.id,
create_at: this.createAt,
update_at: this.updateAt,
edit_at: this.editAt,
delete_at: this.deleteAt,
is_pinned: this.isPinned,
user_id: this.userId,
channel_id: this.channelId,
root_id: this.rootId,
original_id: this.originalId,
message: this.message,
type: this.type,
props: this.props,
pending_post_id: this.pendingPostId,
file_ids: (await this.files.fetchIds()),
metadata: (this.metadata ? this.metadata : {}) as PostMetadata,
hashtags: '',
reply_count: 0,
});
}