Author Topic: Discord protocol  (Read 7123 times)

0 Members and 1 Guest are viewing this topic.

Offline snow

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
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 VulpixTopic starter

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 VulpixTopic starter

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 VulpixTopic starter

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.