I have implemented gemini capsule and added gemini mentions. During mention I save to my db some stuff and I wanted to trigger misfin message to myself. My capsule is written in golang.

I thought I should create gembox in my misfin server with separate capsule identity and use this certificate to send message. Is there golang libs or flow how it should be implemented?

Posted in: s/misfin

๐ŸŒ™ zordsdavini

2025-03-28 ยท 1 year ago

12 Comments โ†“

๐Ÿš€ clseibold [๐Ÿ›‚] ยท 2025-03-28 at 09:41:

My misfin-server is written in golang and includes a gembox and gemmail parser. You can look at it to see how I implemented the code: https://gitlab.com/clseibold/misfin-server

๐ŸŒ™ zordsdavini [OP] ยท 2025-03-28 at 11:49:

@clseibold nice :) I use different server and now will not switch but your lib is awesome. I will try

oh, you even have code block needed for me :) Wonderful

๐Ÿš€ clseibold [๐Ÿ›‚] ยท 2025-03-28 at 12:30:

@zordsdavini No problem! If you have any suggestions or features that need to be added, or help with using any of the stuff, just ask.

Do note that for the client, you need to choose between the default (Misfin(C)) and Misfin(B). There are separate functions and client types for each one.

๐ŸŒ™ zordsdavini [OP] ยท 2025-03-28 at 14:20:

@clseibold I have cipres/misfin server installed and I think it is Misfin(C) compatible but I get error.

โ€” en.arns.lt/f/gemini/2a/misfin_problem.gmi

๐ŸŒ™ zordsdavini [OP] ยท 2025-03-28 at 14:39:

@clseibold set Client to MisfinB and started to work :)

๐Ÿš€ clseibold [๐Ÿ›‚] ยท 2025-03-28 at 15:11:

@zordsdavini The message structure in Misfin(C) is different than Misfin(B). I recommend reading the Misfin(C) spec here, particularly the section titled "The Message": gemini://satch.xyz/misfin/proposed-misfin-c-9th-draft.gmi

You can also use the gemmail package in my misfin-server repo to construct a valid gemmail for Misfin(C). For example:

You just use `message := gemmail.CreateGemMailFromBody(body_text)` to create the gemmail, and then `message.String()` to get back the actual Misfin(C) message format that is required to send over Misfin(C). All this does is basically ensures that the message has 3 empty lines at the beginning of the message, as required by the Misfin(C) spec.

Or, you can optionally just make sure all *newly created* messages that are sent over misfin(C) have three empty lines by prepending "\n\n\n" to it. Please note that this only works for newly created messages, not messages that are being received and then forwarded.

๐Ÿš€ Ezra ยท 2025-03-28 at 18:25:

Why misfin standard does not have title?

๐Ÿš€ Ezra ยท 2025-03-28 at 18:42:

Though if it is gemtext, I gues the first line with # tag can be used as a title.

๐ŸŒ™ zordsdavini [OP] ยท 2025-03-28 at 19:11:

@clseibold you are super right. I refactored to use your gemmail lib and now it works smoothly. I am impresed. If I will not fix current misfin server and docker/traefik issues I'll switch to misfin-server

@Ezra #title at the beginning works as subject in simple email

๐Ÿš€ clseibold [๐Ÿ›‚] ยท 2025-03-28 at 19:58:

@Ezra The misfin spec does allow for the subject line, which is the same as the title.

๐Ÿ™ norayr ยท 2025-08-31 at 00:19:

what are "gemini mentions"?

๐Ÿ™ norayr ยท 2025-08-31 at 00:23:

ok i found

โ€” this

via kennedi search.