superseriousbusiness / gotosocial

Fast, fun, small ActivityPub server.
https://docs.gotosocial.org
GNU Affero General Public License v3.0
3.8k stars 329 forks source link

[bug] Public / Private comment are not set when Bulk importing #3211

Open tux93 opened 2 months ago

tux93 commented 2 months ago

Describe the bug with a clear and concise description of what the bug is.

When using Bulk import to add Domain blocks in the Admin interface the Private / Public comment are not added to the block entry.

What's your GoToSocial Version?

0.16.0

GoToSocial Arch

amd64 binary

What happened?

Trying to use the Bulk import function to update the public comment for a group of domains I noticed that the Comments are not actually set for the domains.

It doesn't matter whether Append / Replace is selected.

After noticing that I also tried Impoorting a domain that was not yet blocked and the Comments are not set there either.

What you expected to happen?

The entered Comment is appended / replaced depending on the selection during Import.

How to reproduce it?

  1. Go to example.com/settings/moderation/domain-permissions/import-export
  2. Enter a domain
  3. Select "Domain block"
  4. Click "Import"
  5. Leave the automatically generated Private comment, add a Public comment
  6. Whether "Append" or "Replace" is selected does not seem to make a difference
  7. Click Import
  8. Check domain entry at example.com/settings/moderation/domain-permissions/blocks
  9. The entry has no Private / Public comment at all

Anything else we need to know?

The PrivateComment / PublicComment entries show up empty in the log:

Aug 19 11:13:24 hal9000 gotosocial[403871]: func=admin.(*Processor).createDomainBlock.func1 level=INFO domain=fedica.com actionID=01J5MYK8N1NMAQXFYDMFWZW4N0 requestID=kyhejtch04001fc65nng msg="processing domain block side effects"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=admin.(*Processor).createDomainBlock.func1.1 level=INFO domain=fedica.com actionID=01J5MYK8N1NMAQXFYDMFWZW4N0 requestID=kyhejtch04001fc65nng msg="finished processing domain block side effects"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=admin.(*Processor).createDomainBlock.func1 level=INFO domain=flipboard.social actionID=01J5MYK8NC4NQHCHFPZFYKD0Q8 requestID=kyhejtch04001fc65nng msg="processing domain block side effects"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=admin.(*Processor).createDomainBlock.func1 level=INFO domain=me.dm actionID=01J5MYK8NG75ETENWP0VW8C728 requestID=kyhejtch04001fc65nng msg="processing domain block side effects"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=admin.(*Processor).createDomainBlock.func1 level=INFO domain=threads.net actionID=01J5MYK8NHH5CM5FXG6K0072G8 requestID=kyhejtch04001fc65nng msg="processing domain block side effects"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=admin.(*Processor).createDomainBlock.func1.1 level=INFO domain=threads.net actionID=01J5MYK8NHH5CM5FXG6K0072G8 requestID=kyhejtch04001fc65nng msg="finished processing domain block side effects"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=admin.(*Processor).createDomainBlock.func1 level=INFO domain=instagram.com actionID=01J5MYK8NKJEXFX6ZMQJGNGZVQ requestID=kyhejtch04001fc65nng msg="processing domain block side effects"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=admin.(*Processor).createDomainBlock.func1.1 level=INFO domain=instagram.com actionID=01J5MYK8NKJEXFX6ZMQJGNGZVQ requestID=kyhejtch04001fc65nng msg="finished processing domain block side effects"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=server.init.func1.Logger.14.1 level=INFO latency=22.237868ms userAgent="Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0" method=POST statusCode=200 path=/api/v1/admin/domain_blocks clientIP=192.168.1.222 requestID=kyhejtch04001fc65nng msg="OK: wrote 340B"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=admin.(*Processor).createDomainBlock.func1 level=INFO domain=minds.com actionID=01J5MYK8NMYCJ49E17BDXR3V4K requestID=kyhejtch04001fc65nng msg="processing domain block side effects"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=admin.(*Processor).createDomainBlock.func1.1 level=INFO domain=minds.com actionID=01J5MYK8NMYCJ49E17BDXR3V4K requestID=kyhejtch04001fc65nng msg="finished processing domain block side effects"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=workers.(*Processor).ProcessFromClientAPI level=INFO activityType=Delete objectType=Person fromAccount=ScienceDesk model="&{ID:01J5MYFHW7HWVKT630BEASSFZ4 CreatedAt:2024-08-19 11:11:23.272061 +0200 CEST UpdatedAt:2024-08-19 11:11:23.272061 +0200 CEST Domain:flipboard.social CreatedByAccountID:01MPENM2DK4JT81SSNSEZQANFT CreatedByAccount:<nil> PrivateComment: PublicComment: Obfuscate:0xc000883e9a SubscriptionID:}" requestID=kyhejtch04001fc65nng msg="processing from client API"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=workers.(*Processor).ProcessFromClientAPI level=INFO activityType=Delete objectType=Person fromAccount=ryderdcm model="&{ID:01J5MYFHW9BSAKVGS29KB6WK18 CreatedAt:2024-08-19 11:11:23.274043 +0200 CEST UpdatedAt:2024-08-19 11:11:23.274043 +0200 CEST Domain:me.dm CreatedByAccountID:01MPENM2DK4JT81SSNSEZQANFT CreatedByAccount:<nil> PrivateComment: PublicComment: Obfuscate:0xc0008d35af SubscriptionID:}" requestID=kyhejtch04001fc65nng msg="processing from client API"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=account.(*Processor).Delete level=INFO username=ScienceDesk domain=flipboard.social requestID=kyhejtch04001fc65nng msg="account delete process complete"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=workers.(*Processor).ProcessFromClientAPI level=INFO activityType=Delete objectType=Person fromAccount=damon model="&{ID:01J5MYFHW7HWVKT630BEASSFZ4 CreatedAt:2024-08-19 11:11:23.272061 +0200 CEST UpdatedAt:2024-08-19 11:11:23.272061 +0200 CEST Domain:flipboard.social CreatedByAccountID:01MPENM2DK4JT81SSNSEZQANFT CreatedByAccount:<nil> PrivateComment: PublicComment: Obfuscate:0xc000883e9a SubscriptionID:}" requestID=kyhejtch04001fc65nng msg="processing from client API"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=account.(*Processor).Delete level=INFO username=ryderdcm domain=me.dm requestID=kyhejtch04001fc65nng msg="account delete process complete"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=workers.(*Processor).ProcessFromClientAPI level=INFO activityType=Delete objectType=Person fromAccount=kshernandez model="&{ID:01J5MYFHW9BSAKVGS29KB6WK18 CreatedAt:2024-08-19 11:11:23.274043 +0200 CEST UpdatedAt:2024-08-19 11:11:23.274043 +0200 CEST Domain:me.dm CreatedByAccountID:01MPENM2DK4JT81SSNSEZQANFT CreatedByAccount:<nil> PrivateComment: PublicComment: Obfuscate:0xc0008d35af SubscriptionID:}" requestID=kyhejtch04001fc65nng msg="processing from client API"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=account.(*Processor).Delete level=INFO username=damon domain=flipboard.social requestID=kyhejtch04001fc65nng msg="account delete process complete"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=workers.(*Processor).ProcessFromClientAPI level=INFO activityType=Delete objectType=Person fromAccount=ArtPhotosDesk model="&{ID:01J5MYFHW7HWVKT630BEASSFZ4 CreatedAt:2024-08-19 11:11:23.272061 +0200 CEST UpdatedAt:2024-08-19 11:11:23.272061 +0200 CEST Domain:flipboard.social CreatedByAccountID:01MPENM2DK4JT81SSNSEZQANFT CreatedByAccount:<nil> PrivateComment: PublicComment: Obfuscate:0xc000883e9a SubscriptionID:}" requestID=kyhejtch04001fc65nng msg="processing from client API"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=account.(*Processor).Delete level=INFO username=kshernandez domain=me.dm requestID=kyhejtch04001fc65nng msg="account delete process complete"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=workers.(*Processor).ProcessFromClientAPI level=INFO activityType=Delete objectType=Person fromAccount=Digitalsailor model="&{ID:01J5MYFHW9BSAKVGS29KB6WK18 CreatedAt:2024-08-19 11:11:23.274043 +0200 CEST UpdatedAt:2024-08-19 11:11:23.274043 +0200 CEST Domain:me.dm CreatedByAccountID:01MPENM2DK4JT81SSNSEZQANFT CreatedByAccount:<nil> PrivateComment: PublicComment: Obfuscate:0xc0008d35af SubscriptionID:}" requestID=kyhejtch04001fc65nng msg="processing from client API"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=account.(*Processor).Delete level=INFO username=ArtPhotosDesk domain=flipboard.social requestID=kyhejtch04001fc65nng msg="account delete process complete"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=workers.(*Processor).ProcessFromClientAPI level=INFO activityType=Delete objectType=Person fromAccount=miaq model="&{ID:01J5MYFHW7HWVKT630BEASSFZ4 CreatedAt:2024-08-19 11:11:23.272061 +0200 CEST UpdatedAt:2024-08-19 11:11:23.272061 +0200 CEST Domain:flipboard.social CreatedByAccountID:01MPENM2DK4JT81SSNSEZQANFT CreatedByAccount:<nil> PrivateComment: PublicComment: Obfuscate:0xc000883e9a SubscriptionID:}" requestID=kyhejtch04001fc65nng msg="processing from client API"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=account.(*Processor).Delete level=INFO username=Digitalsailor domain=me.dm requestID=kyhejtch04001fc65nng msg="account delete process complete"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=workers.(*Processor).ProcessFromClientAPI level=INFO activityType=Delete objectType=Person fromAccount=altlife model="&{ID:01J5MYFHW9BSAKVGS29KB6WK18 CreatedAt:2024-08-19 11:11:23.274043 +0200 CEST UpdatedAt:2024-08-19 11:11:23.274043 +0200 CEST Domain:me.dm CreatedByAccountID:01MPENM2DK4JT81SSNSEZQANFT CreatedByAccount:<nil> PrivateComment: PublicComment: Obfuscate:0xc0008d35af SubscriptionID:}" requestID=kyhejtch04001fc65nng msg="processing from client API"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=account.(*Processor).Delete level=INFO username=miaq domain=flipboard.social requestID=kyhejtch04001fc65nng msg="account delete process complete"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=workers.(*Processor).ProcessFromClientAPI level=INFO activityType=Delete objectType=Person fromAccount=flipboard.social model="&{ID:01J5MYFHW7HWVKT630BEASSFZ4 CreatedAt:2024-08-19 11:11:23.272061 +0200 CEST UpdatedAt:2024-08-19 11:11:23.272061 +0200 CEST Domain:flipboard.social CreatedByAccountID:01MPENM2DK4JT81SSNSEZQANFT CreatedByAccount:<nil> PrivateComment: PublicComment: Obfuscate:0xc000883e9a SubscriptionID:}" requestID=kyhejtch04001fc65nng msg="processing from client API"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=account.(*Processor).Delete level=INFO username=altlife domain=me.dm requestID=kyhejtch04001fc65nng msg="account delete process complete"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=workers.(*Processor).ProcessFromClientAPI level=INFO activityType=Delete objectType=Person fromAccount=me.dm model="&{ID:01J5MYFHW9BSAKVGS29KB6WK18 CreatedAt:2024-08-19 11:11:23.274043 +0200 CEST UpdatedAt:2024-08-19 11:11:23.274043 +0200 CEST Domain:me.dm CreatedByAccountID:01MPENM2DK4JT81SSNSEZQANFT CreatedByAccount:<nil> PrivateComment: PublicComment: Obfuscate:0xc0008d35af SubscriptionID:}" requestID=kyhejtch04001fc65nng msg="processing from client API"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=account.(*Processor).Delete level=INFO username=flipboard.social domain=flipboard.social requestID=kyhejtch04001fc65nng msg="account delete process complete"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=admin.(*Processor).createDomainBlock.func1.1 level=INFO domain=flipboard.social actionID=01J5MYK8NC4NQHCHFPZFYKD0Q8 requestID=kyhejtch04001fc65nng msg="finished processing domain block side effects"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=account.(*Processor).Delete level=INFO username=me.dm domain=me.dm requestID=kyhejtch04001fc65nng msg="account delete process complete"
Aug 19 11:13:24 hal9000 gotosocial[403871]: func=admin.(*Processor).createDomainBlock.func1.1 level=INFO domain=me.dm actionID=01J5MYK8NG75ETENWP0VW8C728 requestID=kyhejtch04001fc65nng msg="finished processing domain block side effects"
tsmethurst commented 2 months ago

I'll take a look-see!

tux93 commented 2 weeks ago

I was almost hoping it might have resolved itself with 0.17.0, but sadly the issue persists...

tsmethurst commented 2 weeks ago

Ah yes we didn't get around to it yet, it totally slipped my mind. We'll be working on allowlist + blocklist subscriptions in the development cycle for 0.18.0 so we'll fix it along the way :)