[musicbrainz-android] 14dependabot[bot] opened pull request #238 (03dev…dependabot/github_actions/dev/yutailang0119/action-android-lint-4): Bump yutailang0119/action-android-lint from 3 to 4 https://github.com/metabrainz/musicbrainz-android…
2024-08-01 21438, 2024
pite_ joined the channel
2024-08-01 21439, 2024
pite has quit
2024-08-01 21411, 2024
BrainzGit
[musicbrainz-android] 14dependabot[bot] opened pull request #239 (03dev…dependabot/gradle/dev/com.google.devtools.ksp-2.0.0-1.0.24): Bump com.google.devtools.ksp from 2.0.0-1.0.23 to 2.0.0-1.0.24 https://github.com/metabrainz/musicbrainz-android…
2024-08-01 21415, 2024
BrainzGit
[musicbrainz-android] 14dependabot[bot] opened pull request #240 (03dev…dependabot/gradle/dev/androidx.paging-paging-runtime-ktx-3.3.1): Bump androidx.paging:paging-runtime-ktx from 3.3.0 to 3.3.1 https://github.com/metabrainz/musicbrainz-android…
[musicbrainz-android] 14dependabot[bot] opened pull request #242 (03dev…dependabot/gradle/dev/io.coil-kt-coil-compose-2.7.0): Bump io.coil-kt:coil-compose from 2.6.0 to 2.7.0 https://github.com/metabrainz/musicbrainz-android…
2024-08-01 21416, 2024
BrainzGit
[musicbrainz-android] 14akshaaatt merged pull request #238 (03dev…dependabot/github_actions/dev/yutailang0119/action-android-lint-4): Bump yutailang0119/action-android-lint from 3 to 4 https://github.com/metabrainz/musicbrainz-android…
2024-08-01 21426, 2024
BrainzGit
[musicbrainz-android] 14akshaaatt merged pull request #239 (03dev…dependabot/gradle/dev/com.google.devtools.ksp-2.0.0-1.0.24): Bump com.google.devtools.ksp from 2.0.0-1.0.23 to 2.0.0-1.0.24 https://github.com/metabrainz/musicbrainz-android…
2024-08-01 21434, 2024
BrainzGit
[musicbrainz-android] 14akshaaatt merged pull request #240 (03dev…dependabot/gradle/dev/androidx.paging-paging-runtime-ktx-3.3.1): Bump androidx.paging:paging-runtime-ktx from 3.3.0 to 3.3.1 https://github.com/metabrainz/musicbrainz-android…
2024-08-01 21445, 2024
BrainzGit
[musicbrainz-android] 14akshaaatt merged pull request #242 (03dev…dependabot/gradle/dev/io.coil-kt-coil-compose-2.7.0): Bump io.coil-kt:coil-compose from 2.6.0 to 2.7.0 https://github.com/metabrainz/musicbrainz-android…
<akshaaatt[m]> "https://mubr.app/ mayhem..." <- Related to an idea I had where I'd put the "listening now" from my LB account on my website
2024-08-01 21405, 2024
Jade[m]
I've seen a couple of people do something similar with lastfm as well
2024-08-01 21405, 2024
bitmap[m]
Jade: hey! I was just reviewing your recent commits. I see you've made a lot of improvements to the Dockerfile and build -- do you think it's ready enough that I can spin up a test version somewhere?
2024-08-01 21422, 2024
Jade[m]
Yep!
2024-08-01 21457, 2024
Jade[m]
It should be as simple as docker pull metabrainz/mb-mail-service:latest and docker run metabrainz/mb-mail-service
2024-08-01 21450, 2024
bitmap[m]
awesome, remind me, all configuration is still performed through environment variables?
2024-08-01 21442, 2024
Jade[m]
Yep
2024-08-01 21416, 2024
Jade[m] sent a yaml code block: https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/LmlbnChksCFsGnMjtOQxvyeW
2024-08-01 21431, 2024
Jade[m]
Should be a functional docker compose definition
2024-08-01 21419, 2024
bitmap[m]
ok, it looks like there aren't really any config options that need to change dynamically, so that should be fine
2024-08-01 21419, 2024
bitmap[m]
I'll work on setting that up on one of our machines today and try sending out a mail
2024-08-01 21435, 2024
bitmap[m]
did you have any luck making progress with the MBS integration?
Specifically, I'm looking at the edit note design, as that's the closest
2024-08-01 21457, 2024
Jade[m]
There's also the 'send to self' option
2024-08-01 21447, 2024
bitmap[m]
right, I think it will be very similar to the edit note one, except the subject will have to be configurable
2024-08-01 21422, 2024
Jade[m]
I can do the subject as an interpolation, which is what's already happening for edit notes
2024-08-01 21419, 2024
Jade[m]
I'm thinking that it's probably a good idea to not let users send emails with entirely arbitrary subjects from a metabrainz
2024-08-01 21422, 2024
Jade[m]
* a metabrainz address
2024-08-01 21402, 2024
bitmap[m]
yeah, maybe. though we don't restrict the body in any case, and I don't think we've had any real issues with this form in the past (which is actually kinda surprising)
2024-08-01 21436, 2024
Jade[m]
Hah yeah, I would've thought it'd be a prime target for spam!
2024-08-01 21450, 2024
bitmap[m]
yeah, I guess they just have far more efficient ways of sending out messages to harvested emails from botnets and such already, maybe it's too primitive for them :P
2024-08-01 21425, 2024
Jade[m]
So far I've got this... (full message at <https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/xMuRGoGzdOpAtJRBuYAiypcB>)
2024-08-01 21433, 2024
Jade[m]
Does it look roughly right to you?
2024-08-01 21431, 2024
bitmap[m]
if you're encoding that to JSON later, instead of my @body = (...) use my $body = {...} (which creates a hash reference)
2024-08-01 21412, 2024
bitmap[m]
and `push @body, $key, value` becomes `$body->{$key} = $value`
2024-08-01 21410, 2024
Jade[m]
so... (full message at <https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/FxzgaclMiOmGgcBvbSmQGwVn>)
2024-08-01 21408, 2024
bitmap[m]
yup, as a small style thing, you don't need to quote the keys when using `key =>` or `$foo->{key}` (as long as they look like identifiers)
2024-08-01 21441, 2024
Jade[m]
Is a - in there OK, for headers?
2024-08-01 21421, 2024
bitmap[m]
you'll have to quote them if they contain -
2024-08-01 21446, 2024
bitmap[m]
letters, numbers, and underscores are fine though
2024-08-01 21430, 2024
Jade[m] sent a perl code block: https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/MoeXpVYdxcXHxWyIPmLLIuXH
2024-08-01 21409, 2024
Jade[m]
* ```perl... (full message at <https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/UuKvcTkJodKqCWYoCxtKDxEP>)
2024-08-01 21424, 2024
Jade[m]
Does that look OK?
2024-08-01 21417, 2024
bitmap[m]
I'm not sure about the `to_json($body->to_hash))` bit but I think it looks okay
2024-08-01 21434, 2024
bitmap[m]
what's `$body->to_hash`?
2024-08-01 21424, 2024
Jade[m]
This is me copy and pasting from the wrong places, oops
2024-08-01 21447, 2024
bitmap[m]
to_json should be encode_json too
2024-08-01 21427, 2024
bitmap[m]
(I assume the $_request scalar was declared previously since it has no my)
(slightly different since that's not posting JSON)
2024-08-01 21401, 2024
Jade[m] sent a perl code block: https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/NQnarvVIWbPotVJFBjkmniZa
2024-08-01 21416, 2024
Jade[m]
Right, that should be functional
2024-08-01 21426, 2024
Jade[m]
Now to figure out how to test it
2024-08-01 21456, 2024
Jade[m]
And push the template in mb-mail-service 😅
2024-08-01 21459, 2024
bitmap[m]
don't forget a semi-colon at the end of the $header_params (Perl will actually choke there)
2024-08-01 21410, 2024
bitmap[m]
if you enable DB_STAGING_TESTING_FEATURES in lib/DBDefs.pm, you'll enable an "Edit user" tab from any user profile, and you can set an email for them (tick "Skip verification")
So I got the normal SMTP sending to work on my local instance
2024-08-01 21414, 2024
Jade[m]
However I'm having trouble getting the LWP instance
2024-08-01 21405, 2024
Jade[m]
`$self->lwp->request` results in "Can't locate object method "lwp" via ..."
2024-08-01 21444, 2024
Jade[m]
`$self->model('MB')->context->lwp->request` results in "can't locate object "model" ..."
2024-08-01 21450, 2024
Jade[m]
What am I missing here?
2024-08-01 21400, 2024
bitmap[m]
have you tried `$self->c->lwp->request`?
2024-08-01 21423, 2024
bitmap[m]
there is a has 'c' in Email.pm
2024-08-01 21442, 2024
Jade[m]
Sorry about the delay, I got snagged for an imprompu website consultation lol
2024-08-01 21451, 2024
Jade[m] uploaded a video: (650KiB) < https://matrix.chatbrainz.org/_matrix/media/v3/download/matrix.org/FPUcFutNHJztummjMVNIcTvR/Screencast%20from%202024-08-01%2019-41-52.mp4 >
2024-08-01 21402, 2024
Jade[m]
<bitmap[m]> "have you tried `$self->c->lwp->..." <- Thisn works, thank you!
2024-08-01 21416, 2024
Jade[m]
s/Thisn/This/
2024-08-01 21449, 2024
Jade[m]
It's working! 🎉
2024-08-01 21405, 2024
Jade[m]
Is there a ticket for this already, or should I make one?
2024-08-01 21440, 2024
bitmap[m]
Jade[m]: I don't think there is, can you? thanks!
2024-08-01 21455, 2024
Jade[m]
Will do :)
2024-08-01 21419, 2024
aerozol[m]
Jade: is that the 'contact user' button/form? Let me know if you need design changes, but I think it should fit into one of those templates. Since it's from another user you might like to use the speech bubble box again 😎
2024-08-01 21441, 2024
Jade[m]
aerozol[m]: Yep!
2024-08-01 21456, 2024
Jade[m]
<Jade[m]> "Screencast from 2024-08-01 19-41..." <- This is it, if you can load the video