Closed Alcaro closed 6 years ago
I think this closes #143
Seems so.
I'm able to receive emotes in both channels and privates with this patch applied. I'm not in any group chats, so I can't test that, but they follow the same codepath as normal channels anyways.
Thank you. I, as well, am a bit concerned about mentions being processed for both, but we can deal with it if it breaks something.
Sure, I can test that. If I tell my bot to query me a highlight of myself, the bot, and some random guy, the raw message (according to the bot, but we'll both get the same thing) is:
[21:53:59] >> {"t":"MESSAGE_CREATE","s":35080,"op":0,"d":{"type":0,"tts":false,"timestamp":"2018-07-11T19:53:59.348000+00:00","pinned":false,"nonce":null,"mentions":[{"username":"Alcaro","id":"188322172576464896","discriminator":"3261","avatar":"e3466274aa00038c9b27e3cb0b95dae5"},{"username":"Walrusbot","id":"281724269606469633","discriminator":"2570","bot":true,"avatar":"af1176e5ee2002e592739f82698974c1"}],"mention_roles":[],"mention_everyone":false,"id":"466693660231335957","embeds":[],"edited_timestamp":null,"content":"<@188322172576464896> <@281724269606469633> <@83335887848476672>","channel_id":"329311168013533196","author":{"username":"Walrusbot","id":"281724269606469633","discriminator":"2570","bot":true,"avatar":"af1176e5ee2002e592739f82698974c1"},"attachments":[]}}
which latest bitlbee-discord renders as:
<Walrusbot> @Alcaro @Wаlrusbot <@83335887848476672>
but previously, it'd render all three as <@123456789012345678>
.
Conclusion: There is no cause for concern; in fact, this is an improvement. Though I can agree it would've been better to test that beforehand.
Great, thanks again
As requested by one of my nitro-loving friends
Not sure if the highlight/channel handlers do anything useful in private messages, but they don't seem to do any harm.