Author Topic: Discord protocol  (Read 54833 times)

0 Members and 1 Guest are viewing this topic.

Offline snow

  • Newbie
  • *
  • Posts: 5
Re: Discord protocol
« Reply #30 on: 25 02 2019, 11:03:43 »
I was wondering if there's a technical reason that group chats display user names with the discriminator (#1234)?

When using discord through a web browser, group chats there only display the plain user names, which I find looks a bit nicer.

As a quick test I removed the discrimator (when assigning wszNick in OnCommandGuildMemberUpdated and ParseGuildContents) and it appears to still work. Perhaps it could be an option?
 

Offline Vulpix

Re: Discord protocol
« Reply #31 on: 25 02 2019, 17:49:21 »
There are many things wrong with the way group chats work - like how you can't easily @person, you can't send media to group chat etc. This part with the IDs could be an easy toggle option (show/not show). I like seeing both because I have some chats where a person is present with the same name but different ID.
 

Offline Ratha

Re: Discord protocol
« Reply #32 on: 14 07 2019, 08:44:45 »
Im running an old build of Miranda 0.95.11 #21135, and ran a test earlier where i asked a friend to delete me from his contact list. When he removed me as a friend, it also removed him from my Miranda contact list, deleted all of our chat history, and removed all of my custom user notes that i had stored with TabSRMM. He re-added me after a few minutes and none of the missing chat history or notes were restored. I was also unable to find an option to re-import chat history stored on Discord.

Questions:
1: Was this automatically-deleted data also purged from the database, or is it still stored and now orphaned in there somewhere increasing database size / bloat?

2: Shouldnt the contact, any custom TabSRMM notes for them, and the history be stored locally by history++ in the Miranda database and thus not susceptible to remote deletion? There is an argument to be made that if a user has deleted you that you shouldnt have access to their chat anymore, however all of the things that you have written to them are also deleted as well. This makes using the Discord protocol in Miranda for storing important data, very unreliable.

3: Has the Discord plugin been updated in the last year in a way that would change this behavior? (It seems like we shouldnt lose the contact from our list, along with all custom notes, and all of the message history. (And without any kind of warning that a user has removed you, you might not even know who or what you lost or have any ability to save / restore that data from a backup.)
 

Offline Vulpix

Re: Discord protocol
« Reply #33 on: 14 07 2019, 10:50:34 »
Unfortunately the answer to all of the above is that all of your contact data was lost.

https://github.com/miranda-ng/miranda-ng/issues/812 I logged this a long time ago because of the really unreasonable implementation in regard to my personal user data...

It's basically what you're talking about.

The "workaround" I use until 812 is implemented is - I have backups of my profile file every hour, and when I'm doing weekly backups, I notice there is a missing contact (because I do msgexport all -> compare to last week), and then I go back to when the contact disappeared, launch miranda in offline mode with that profile -> export all of my data -> go back to normal miranda -> create a dummy contact -> import all of the history and other data.

Terrible, but as you can see 812 has been logged a long time ago with no progress hehe.

Oh, there is an option to load server history by the way (at least in newer discord), by right-clicking the contact and doing "Load server history".
« Last Edit: 14 07 2019, 11:00:25 by Vulpix »
 

Offline Ratha

Re: Discord protocol
« Reply #34 on: 14 07 2019, 11:55:14 »
This was something that I noticed a long time ago, but didnt intend on using discord enough for it to meaningfully matter at the time. Now that i use it more often its become a bit of a concern. I appreciate the heads up though and the info about being able to load server history. I want to say that it used to be an option, but perhaps it was disabled in my older build. (Constantly updating introduces various problems I've noticed, so once i find a good build of a program i stick with it until an update i need comes along usually.)

I have a few days worth of backups for the purpose of reloading if i should notice something has happened, but probably wouldnt notice some people removing me and thus would probably lose all that history before manually backing it up to cold storage. You say you use 'msgexport all' and compare to the prior week to check for missing contacts, is that a command line option for Miranda, a plugin, or some other program?

I would be interested in learning more about that method you're using, although my profile is pretty large at this point at around 135 megs, 200 contacts, and somewhere between 500k and a million messages stored. Not to mention a handful of often-hidden groups of people i dont talk to frequently. Im not sure if it would be feasible to do a comparison of contacts/messages frequently enough to proactively prevent loss of data. Though it does make me realize that i should probably increase the number of stored auto-backups, plus create manual ones on a much more frequent timetable.
 

Offline Vulpix

Re: Discord protocol
« Reply #35 on: 14 07 2019, 14:27:28 »
I will write up my own "best practices for hazardous materials handling" aka miranda :D When I'm a bit less busy (currently crunch time on a crazy project so I'm pulling personal overtime even during the weekend)

My profile is currently 472 MB, which is 4 247 942 messages according to the HistoryStats plugin. The method I use makes it manageable and doesn't take longer than a few minutes every week (of course takes longer if you detect an issue this way, but even so that makes it manageable since a part of it is having backups).

The gist of it is, there is a plugin called MsgExport which exports any message of any contact into a file (the format is the json format that import plugin knows how to import).

The plugin has a button that lets you export all histories for all users in your db (and it also merges users based on their nick, or manual preferences).

That way you can easily tell if someone removed you, i.e. the filename will be gone, or the file contents will be vastly different compared to that of last week (which is a full export kept for reference). For this comparison I use synchronize mode of Total Commander in "ignore dates / compare by contents" mode. There is a bash script that is necessary first due to some flags, but this method will also discover database corruption and allow you to recover it (for example partial db corruption), which for example just db backups alone will not.

It is the only reason I've not lost any user data during these turbulent times.

I'll write it up in more detail but I think this will do for a rough overview.

My miranda is my life, and the data in it is precious.
 

Offline yo1999

  • Newbie
  • *
  • Posts: 6
Re: Discord protocol
« Reply #36 on: 20 09 2019, 15:57:05 »
I'm sorry if i'l seem stupid, but how do i login into discord with miranda. I look at at the available protocols and don't see it.
 

Offline Vulpix

Re: Discord protocol
« Reply #37 on: 21 09 2019, 00:29:03 »
You need to download the protocol first - either via plugin/module downloader through miranda, or from the website. Then you should see it in the available protocols.
 

Offline Andys

  • Newbie
  • *
  • Posts: 5
Re: Discord protocol
« Reply #38 on: 23 10 2019, 11:10:02 »
Is there a way to move or copy channel contact to other groups?
I want to keep few channels in immediate reach (root of contact list) and the big tree branch with other channels collapsed.

Unfortunately if I move channel contact it is moved back as soon as I go offline and back online.
« Last Edit: 23 10 2019, 11:12:13 by Andys »
 

Offline Vulpix

Re: Discord protocol
« Reply #39 on: 23 10 2019, 11:17:30 »
That is strange. I have this set up myself - I have a group "DiscordChats" and then another group "ChatRooms". All of the discord chats initially land in chatrooms, from where I move the important/intersting ones to "DiscordChats" group. This setting persists through restart of miranda and relogin. Maybe the problem is with them having no group?
 

Offline Andys

  • Newbie
  • *
  • Posts: 5
Re: Discord protocol
« Reply #40 on: 23 10 2019, 11:34:23 »
That is strange. I have this set up myself - I have a group "DiscordChats" and then another group "ChatRooms". All of the discord chats initially land in chatrooms, from where I move the important/intersting ones to "DiscordChats" group. This setting persists through restart of miranda and relogin. Maybe the problem is with them having no group?
Thanks! I found my mistake - when setting up the account I enabled 'use subgroups for channels', so it was resorting them each time the list was loaded from discord
 

Offline Andys

  • Newbie
  • *
  • Posts: 5
Re: Discord protocol
« Reply #41 on: 30 10 2019, 13:24:49 »
Kind of DIY post.
What I wanted to do: get instant notification when something new was posted in few discord channels I regularly watch for game news from devs. Without installing any extra apps on my PC, just wanted to have it all in Miranda.

One problem I encountered on the way is that you cannot enable tray icon showing up for new messages in a single group chat (discord channel). You can only enable or disable them for all of them so if your main discord account joined a few servers you get a tray icon notification for any new message in any of their channels. Not mentioning that all these channels would flood your Group Chats group in contact list.

So the steps to make it possible:
1. create a new server using your main discord account and make a single text channel (may use #general)
2. create a 'bot' account on discord
3. invite this account to your server, join it, check that you see the text channel in it
4. in miranda set up discord account with this bot login and password
5. test it - login to discord with your main account and post something in your channel, check that miranda got this message and everything is working
6. enable tray icon for new messages in group chats (Options - Message sessions - Group chats - Icons to display in tray - messages
7. add channels you want to get notifications for by going to discord with your main account, and following the channel you like (link to your empty server and text channel)

Voila, it works now:
- my contact list isn't overflowing with thousands of channels from my primary discord account
- I get notified by tray icon every time someone posts to one of my followed channels
- I can easily add or remove channels to/from watch list while  using discord with my main account, no need to re-login as bot account

Of course if you use other group chats beside Discord this won't work for you (you don't want a tray icon every time someone posts some nonsense in one of them)
And darn, the follow option is only available for announcement channels, WTF with that...
« Last Edit: 31 10 2019, 12:11:00 by Andys »
 

Offline Thug

Re: Discord protocol
« Reply #42 on: 23 02 2020, 10:18:47 »
Sometimes Miranda continuously fails to connect to Discord server, and somehow logging in on the website fixes this problem. I have made a netlog.
 

Offline ghazan

Re: Discord protocol
« Reply #43 on: 23 02 2020, 19:46:29 »
Sometimes Miranda continuously fails to connect to Discord server, and somehow logging in on the website fixes this problem. I have made a netlog.
That's evident -
{"captcha_key": ["captcha-required"]}
 

Offline Thug

Re: Discord protocol
« Reply #44 on: 24 02 2020, 00:52:48 »
ghazan, server glitch?