Closed SoniEx2 closed 6 years ago
It tries to figure out whether the current message is a reply to somebody or not.
but how does it know the remote user's... account? or at least how does it insert it into the message? it seems to just shuffle some bytes around???
say I send a message fuz: whatever
how does it know fuz
means @fuz@whatever
and how does it turn fuz:
into @fuz@whatever
?
I understand how it can turn fuz:
into @fuz
, because the length is the same and it's just shifting fuz
up by one and then adding an @
. but how does it add the rest?
I guess bitlbee does something with messages before handing them to us.
You are right! This is a bug. Some background: the nick we reply to (fuz
) is the IRC nick. So if fuz@mastodon.social
and fuz@octodon.social
are in your channel, one of them is called fuz
and the other is called fuz_
. So now we take this IRC nick (the handle) and look it up using bee_user_by_handle
. This gives us mastodon_user_data
. There, we should add the fully qualified name as a member and use that.
When I just tried it:
09:12 <kensanata> kensanata_: test
09:12 <root> You: [22] @kensanata test
09:12 <kensanata> info 22
...
09:12 <root> content: @kensanata test
...
09:12 <root> mentions: [
09:12 <root> {
09:12 <root> id: 67176
09:12 <root> username: kensanata
09:12 <root> url: https://social.nasqueron.org/@kensanata
09:12 <root> acct: kensanata@social.nasqueron.org
09:12 <root> }
09:12 <root> ]
And when I look at it online, using the official web client, it looks good! How strange.
So, now I wonder whether this is a bug or not...
Yeah, as I said it seems the mentions go out correctly. But I don't know why it works.
I'm gonna close this because it works.
It works by magic, but what matters is that it works.
Does this also apply to mentions in the control channel? something like hello foobar -> hello foobar@bar.de
I'm not sure what the context for your question is. Are you reporting a new issue? This issue was a question we had and we didn't know how Mastodon works. Will don't know how it works, but … it seems unrelated to what you are saying? I don't know, I'm a bit confused.
I was just wondering if it also relates to mentioning user while sending out new toots. But it might be as well a new issue.
I'm trying to understand MASTODON_MAYBE_REPLY but I have no idea how it works?