panel icon indicating copy to clipboard operation
panel copied to clipboard

DiscordWebhooks

Open JoanFo1456 opened this issue 7 months ago • 6 comments

After repairing some issues i had with my git, i suppose now is ready to work. (Did a pr before) Some files probably have disappeared on another ones with the new changes recently, same some files probably need to be on another part, after all, this was a update following main but some files weren't removed at all... I will make changes on it, making it less "draft" if this is accepted, only change that needs to be done at least i think is when saving to reload filament with the new changes.

JoanFo1456 avatar May 08 '25 21:05 JoanFo1456

image Lance asked for a preview, this is an example i made, i'm only using the embed editor, but also works with messages only, variables on the payload can be used on the preview and discord. When a variable like name doesn't exist on the view, it uses Faker to show a name.

JoanFo1456 avatar May 09 '25 07:05 JoanFo1456

Lance, if you get the chance let me know if everything is good or not, my suggestion here is adding once again faker to show example values on the embed, instead of giving the values directly.

JoanFo1456 avatar May 13 '25 15:05 JoanFo1456

I have used a phpstan ignore next line on DiscordPreview, since i didn't quite found a way, i'm open to suggestions...

JoanFo1456 avatar May 15 '25 21:05 JoanFo1456

I had to undo the changes on ProcessWebhook because phpstan was saying that "Strict comparison using === between string|null and App\Enums\WebhookType::Discord will always evaluate to false." Or when only using a = will say that was always true, this way seems to be working...

JoanFo1456 avatar May 20 '25 11:05 JoanFo1456

I had to undo the changes on ProcessWebhook because phpstan was saying that "Strict comparison using === between string|null and App\Enums\WebhookType::Discord will always evaluate to false." Or when only using a = will say that was always true, this way seems to be working...

You have to add the enum cast for type like Lance said. Then it won't complain.

Boy132 avatar May 20 '25 12:05 Boy132

You have to add the enum cast for type like Lance said. Then it won't complain.

Forgot about that change, thanks.

JoanFo1456 avatar May 20 '25 12:05 JoanFo1456

Still can't be merged, since the change you asked headers stopped being sent, i'm looking at it.

JoanFo1456 avatar May 26 '25 22:05 JoanFo1456

Now you can take a look and everything...

JoanFo1456 avatar May 26 '25 23:05 JoanFo1456

Everything seems good to be merged, so if you guys want, go ahead.

JoanFo1456 avatar Jun 07 '25 20:06 JoanFo1456

You guys think is good enough to be on the panel? Or should I make some other changes

JoanFo1456 avatar Jun 12 '25 23:06 JoanFo1456