GithubHelp home page GithubHelp logo

Comments (4)

sm00th avatar sm00th commented on July 20, 2024

Hm, that is odd. I don't have a bitlbee debug environment atm, but I've extracted relevant code chunks into a separate file(build with gcc -Wall -g -o imc_away_state_find imc_away_state_find.c $(pkg-config --cflags --libs glib-2.0)) and it seems to be working as intended:

$ ./imc_away_state_find "Busy - resting after trip"
away=DND
$ ./imc_away_state_find "DND - resting after trip"
away=dnd

from bitlbee-discord.

digitalcircuit avatar digitalcircuit commented on July 20, 2024

Thank you for your time testing this!

Huh. I wonder if Discord's API is mandating lowercase dnd/etc in order to set status as Busy/Do Not Disturb.

When I have time in these upcoming days, I'll try throwing a GLib lowercase function into the outgoing Discord WebSocket status function to see if that fixes the issue.

from bitlbee-discord.

digitalcircuit avatar digitalcircuit commented on July 20, 2024

I'm pretty confident this is why:

Busy alias

/away Busy - resting after trip (taking longer than predicted, thanks for patience

(I accidentally left off the ending ) when testing this time, that's not a bug)

[16:04:03] >>> (digitalcircuit) discord_ws_send_payload 166
{"op":3,"d":{"since":1641330243000,"game":{"name":"Busy - resting after trip (taking longer than predicted, thanks for patience","type":0},"afk":true,"status":"DND"}}

[16:04:03] <<< (digitalcircuit) discord_parse_message 1209
{"t":"GUILD_MEMBER_LIST_UPDATE","s":102,"op":0,"d":{"ops":[{"op":"UPDATE","item":…"presence":{"user":{"id":"…"},"status":"online","game":{"type":0,"session_id":null,"name":"Busy - resting after trip (taking longer than predicted, thanks for patience","id":"e78eefaaab722356","created_at":1641330243900},"client_status":{"web":"online"},"activities":[{"type":0,"name":"Busy - resting after trip (taking longer than predicted, thanks fo
r patience","id":"e78eefaaab722356","created_at":1641330243900},{"type":0,"name":"DND - resting after trip (taking longer than predicted, thanks for patience","id":"e74904c682bdc973","created_at":1641329384811}]},…]}}

"status":"DND""client_status":{"web":"online"}

DND direct

/away DND - resting after trip (taking longer than predicted, thanks for patience

[16:04:13] >>> (digitalcircuit) discord_ws_send_payload 165
{"op":3,"d":{"since":1641330253000,"game":{"name":"DND - resting after trip (taking longer than predicted, thanks for patience","type":0},"afk":true,"status":"dnd"}}

[16:04:14] <<< (digitalcircuit) discord_parse_message 1201
{"t":"GUILD_MEMBER_LIST_UPDATE","s":117,"op":0,"d":{"ops":[{"op":"UPDATE","item":{"member":{"user":{…},"status":"dnd","game":{"type":0,"session_id":null,"name":"DND - resting after trip (taking longer than predic
ted, thanks for patience","id":"b24973adb837dcfd","created_at":1641330253980},"client_status":{"web":"dnd"},"activities":[{"type":0,"name":"DND - resting after trip (taking longer than predicted, thanks for patien
ce","id":"b24973adb837dcfd","created_at":1641330253980},{"type":0,"name":"DND - resting after trip (taking longer than predicted, thanks for patience","id":"e74904c682bdc973","created_at":1641329384811}]},…]}}

"status":"dnd""client_status":{"web":"dnd"}

Working on a fix, not yet grasped GLib's method of doing things but I'll probably figure it out.

from bitlbee-discord.

digitalcircuit avatar digitalcircuit commented on July 20, 2024

This has been fixed in Bitlbee itself as of bitlbee/bitlbee@b82ba4a !

I'm closing this issue here. See #230 if you are stuck on old Bitlbee versions.

from bitlbee-discord.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.