Author Topic: Bugs using Discord Protocol  (Read 104 times)

0 Members and 1 Guest are viewing this topic.

Offline EinsiedlerTopic starter

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Bugs using Discord Protocol
« on: 03 01 2019, 16:27:59 »
Hey all,

since ICQ ist not working atm with the stable version, a friend and I tried using discord with miranda. It is working decently, but there are some bugs we've encountered:


Link duplication

- If you send a link to a chatbuddy, most times it happens that Miranda sends another message directly after it, duplicating the link and adding some other text (like a preview of the site), which is very annoying. If you look at the message in the discord webinterface, everything looks ok. We've already de-activated all settings in discord like link previews, etc.

For example, if you send this Link: https://github.com/miranda-ng/miranda-ng/issues/812

Miranda will send this additionally:

Embedded: https://github.com/miranda-ng/miranda-ng/issues/812
   GitHub link
   With other protocols (i.e. steam, skype, tox, etc), when a user removes you from their contact list, they will appear offline to you, but you will still see their contact and you can browse the his...
Preview: https://avatars2.githubusercontent.com/u/8679333?s=400&v=4
ecieving, so that cannot be the case...


Status indicator

- If you set your status in Miranda, then your buddies won't see it right away. Only if you change it directly in the webinterface, it works instantly and your buddies can see the changes in Miranda too. There seems to be no effect if you change the status in Miranda itself ...

- Status terms compared between Miranda and Discord itself -> "Online" is ok, "Do not disturb" is ok too. But "Away" in Miranda is not shown if you set "Away" in discord itself, Miranda displays "Not at Home" instead.

- Also, if you go offline with Miranda, your buddies will see you offline in their lists about 1-2 minutes later.


Delay when in chat with a buddy

- When in chat with a buddy, it seems that i'm around 4 seconds behind. If I recieve a message, and reply within 1-4 seconds, Miranda will put my message before the message of my buddy, and i got a incorrect history. Idk why the times are not synchronized on both ends. He gets my messages directly for sure, there is no delay between sending and recieving we've tested this, so that cannot be the case...

- If you are typing a message, your chat partner will see this as "XYZ is typing a message". This information will stay for 20 (!) seconds, even when the partner isn't typing anymore. When using old ICQ with miranda for example, this information was more "live" and disappeared almost immediately when you stopped typing.


Thats all for now, i'm really looking forward to your answers  :)
« Last Edit: 03 01 2019, 16:50:17 by Einsiedler »
 

Online Vulpix

  • Beta Tester
  • *****
  • Posts: 600
  • Country: 00
  • Karma: 15
Re: Bugs using Discord Protocol
« Reply #1 on: 04 01 2019, 08:10:43 »
Hey all,

since ICQ ist not working atm with the stable version, a friend and I tried using discord with miranda. It is working decently, but there are some bugs we've encountered:


Link duplication

- If you send a link to a chatbuddy, most times it happens that Miranda sends another message directly after it, duplicating the link and adding some other text (like a preview of the site), which is very annoying. If you look at the message in the discord webinterface, everything looks ok. We've already de-activated all settings in discord like link previews, etc.

For example, if you send this Link: https://github.com/miranda-ng/miranda-ng/issues/812

Miranda will send this additionally:

Embedded: https://github.com/miranda-ng/miranda-ng/issues/812
   GitHub link
   With other protocols (i.e. steam, skype, tox, etc), when a user removes you from their contact list, they will appear offline to you, but you will still see their contact and you can browse the his...
Preview: https://avatars2.githubusercontent.com/u/8679333?s=400&v=4
ecieving, so that cannot be the case...

It's not link duplication and it's not miranda's "fault". The normal client does the same. What happens is, you send a link and since everything in Discord is being overseen by the big brother server, the server reads the link and opens the page. If Discord folks implement a way to gather small preview of the content, then you will receive an updated message (the server will modify your message) and add the metadata. I call it the "embed", as it embeds the media. It works exactly the same in miranda as it does in all the web clients, difference is miranda does not have a theme/style to interpret this change, so instead of the embed, you see just a sorta "duplicate" message. In latest dev version, this is actually correctly applied to your own message so in chat log you will probably still see two messages, but in history and such, only one message - with the embed - is stored.

Not really a bug. Maybe someone can make an ieview template which understands this response and shows a preview of the content - much like Discord clients do.

Status indicator

- If you set your status in Miranda, then your buddies won't see it right away. Only if you change it directly in the webinterface, it works instantly and your buddies can see the changes in Miranda too. There seems to be no effect if you change the status in Miranda itself ...

- Status terms compared between Miranda and Discord itself -> "Online" is ok, "Do not disturb" is ok too. But "Away" in Miranda is not shown if you set "Away" in discord itself, Miranda displays "Not at Home" instead.

- Also, if you go offline with Miranda, your buddies will see you offline in their lists about 1-2 minutes later.

Yeah... this is a bug. It's already reported and Ghazan looked into this but even though we properly send all of the required info, the status does not change. We do not know why yet. You don't really even need to change the status in web interface. What you need to do is have the web interface running - at the same time as miranda - then any changes done in miranda will actually show. There is something the web interface does in addition to just sending the status, but we've not figured out what that is yet. You can log it on github as an issue, although as said ghazan is aware.

Delay when in chat with a buddy

- When in chat with a buddy, it seems that i'm around 4 seconds behind. If I recieve a message, and reply within 1-4 seconds, Miranda will put my message before the message of my buddy, and i got a incorrect history. Idk why the times are not synchronized on both ends. He gets my messages directly for sure, there is no delay between sending and recieving we've tested this, so that cannot be the case...


You should check if your time is synchronized between you and your friend. Make sure both of your computers are set to sync from NTP and that the sync has been successful, and try again.

However this may be related to a change made to prevent fake message non-sending and problems with duplicate histories - we no longer store any of the message we send. Instead we always just read the output of the server. That means that when you send a message, you will only see it after the server acknowledges it and sends it back to you. I use discord a lot and I don't have the delay problem; even when I'm talking to a friend very quickly (like if we are exchanging messages within span of 1-2 seconds). I'd try timesync and then again see if it works better perhaps. If not, we'll need a netlog.

- If you are typing a message, your chat partner will see this as "XYZ is typing a message". This information will stay for 20 (!) seconds, even when the partner isn't typing anymore. When using old ICQ with miranda for example, this information was more "live" and disappeared almost immediately when you stopped typing.

Hmm, I don't recall if discord has a "stopped typing" api method; I don't think it does. It's a websocket protocol, and more or less everything that happens on these is done by just firing an event and forgetting about it. i.e. the typing works on a basis whereby miranda sends a "started typing", and then if this is no longer sent, the server sets you as not typing on a timeout basis. So it's possible you see yourself as typing when you really are not anymore, because this is the kind of protocol discord is. If the client behaves differently, it may be a bug; I didn't test this.
« Last Edit: 04 01 2019, 08:31:15 by Vulpix »