fix mark time not updated when change status
This commit is contained in:
parent
2e52ecf293
commit
566868b886
4 changed files with 22 additions and 8 deletions
13
.github/workflows/deploy.yml
vendored
13
.github/workflows/deploy.yml
vendored
|
@ -14,6 +14,13 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
environment: ${{ vars.DEPLOY_ENV }}
|
||||
steps:
|
||||
- name: Send start notification
|
||||
uses: appleboy/discord-action@master
|
||||
with:
|
||||
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
|
||||
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
|
||||
color: "#6848a9"
|
||||
message: "Deployment started."
|
||||
- name: ssh
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
|
@ -22,10 +29,10 @@ jobs:
|
|||
username: ${{ secrets.SSH_USER }}
|
||||
key: ${{ secrets.SSH_KEY }}
|
||||
script: ${{ vars.DEPLOY_SCRIPT }}
|
||||
|
||||
- name: Send Discord notification
|
||||
- name: Send complete notification
|
||||
uses: appleboy/discord-action@master
|
||||
with:
|
||||
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
|
||||
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
|
||||
args: Deployment complete.
|
||||
color: "#6848a9"
|
||||
message: "Deployment complete."
|
||||
|
|
6
.github/workflows/publish.yml
vendored
6
.github/workflows/publish.yml
vendored
|
@ -36,7 +36,8 @@ jobs:
|
|||
with:
|
||||
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
|
||||
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
|
||||
args: Building docker image ${{ steps.version.outputs.neodb }}-${{ steps.version.outputs.takahe }}
|
||||
color: "#1857a4"
|
||||
message: Building docker image ${{ steps.version.outputs.neodb }}-${{ steps.version.outputs.takahe }}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
@ -71,4 +72,5 @@ jobs:
|
|||
with:
|
||||
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
|
||||
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
|
||||
args: Published docker image ${{ steps.version.outputs.neodb }}-${{ steps.version.outputs.takahe }}
|
||||
color: "#1857a4"
|
||||
message: Published docker image ${{ steps.version.outputs.neodb }}-${{ steps.version.outputs.takahe }}
|
||||
|
|
|
@ -210,8 +210,7 @@ class Mark:
|
|||
d = {"parent": shelf, "visibility": visibility, "position": 0}
|
||||
if metadata:
|
||||
d["metadata"] = metadata
|
||||
if created_time:
|
||||
d["created_time"] = created_time
|
||||
d["created_time"] = created_time or timezone.now()
|
||||
self.shelfmember, _ = ShelfMember.objects.update_or_create(
|
||||
owner=self.owner, item=self.item, defaults=d
|
||||
)
|
||||
|
|
|
@ -524,7 +524,13 @@ class Takahe:
|
|||
v = Takahe.visibility_n2t(
|
||||
mark.visibility, user.preference.mastodon_publish_public
|
||||
)
|
||||
existing_post = None if share_as_new_post else mark.shelfmember.latest_post
|
||||
existing_post = (
|
||||
None
|
||||
if share_as_new_post
|
||||
or mark.shelfmember.latest_post is None
|
||||
or mark.shelfmember.latest_post.state in ["deleted", "deleted_fanned_out"]
|
||||
else mark.shelfmember.latest_post
|
||||
)
|
||||
post = Takahe.post(
|
||||
mark.owner.pk,
|
||||
pre_conetent,
|
||||
|
|
Loading…
Add table
Reference in a new issue