Miranda NG Official Community Forum

Forum for English speaking Miranda NG users => Feature requests => Topic started by: Vulpix on 15 09 2014, 08:18:40

Title: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: Vulpix on 15 09 2014, 08:18:40
Hello all!

I'm curious how difficult it would be to change / implement a so-called "faux offline messaging" into tabsrmm.

Currently, tabsrmm has an option to send later / retry / keep trying etc.  This is _almost_ good enough, but not quite.. since the time between attempts increases exponentially, and in the end, the plugin sort of gives up until you restart miranda (which is documented; I'm not saying this is a bad behavior).

What I'm looking for is the ability to handle offline messages like Skype used to:

Core features:

Quality of life features:

The advantage of this would be the protocol-independent nature of these messages, i.e. no support in protocol required for this to work. Kind of like FileAsMessage does file transfers over any protocol as well.

Thoughts?
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: Robyer on 15 09 2014, 09:46:36
I like this idea. But I don't know how complicated would be implementation or who will do it  ???
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: mida on 15 09 2014, 13:01:04
how can i change in the settings or db editor++ that tabsrmm get lesser time for sending a message?
a few times if im sending a message it feels that it needs 30 seconds until i get the popup my message cant sent.
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: watcher on 15 09 2014, 13:13:41
mida, in which protocol?
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: mida on 15 09 2014, 14:31:03
it was mainly in icq, maybe a little connection lost but was only a few times.
from last 30 days was it less as 10 messages where tabsrmm says me.
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: Robyer on 15 09 2014, 16:04:31
30 seconds is minimal interval that could be set. It's hardcoded in tabsrmm. AFAIK you can't change it through dbeditor, it must be changed in code...
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: mida on 15 09 2014, 18:17:32
ok thanks should i do now a extra ticket for it? for myself its have very less priority
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: Wishmaster on 15 09 2014, 18:30:36
ok thanks should i do now a extra ticket for it? for myself its have very less priority
Why do you want to do that anyways? The messages aren't sent faster by that. It is just the time it waits for an acknowledgement from another client. The hardcoded lower time of 30 is fine like that.
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: mida on 15 09 2014, 19:05:20
for what for a protocol it must wait 30 seconds for an acknowledgement?
most protocols are server based thats sent possible answer in much less as this 30 seconds.
or have it a other reason?
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: Wishmaster on 15 09 2014, 19:17:42
for what for a protocol it must wait 30 seconds for an acknowledgement?
most protocols are server based thats sent possible answer in much less as this 30 seconds.
or have it a other reason?
Well, most are but some are not. Tox for example.
If a protocol sends it earlier it is marked as sent. The 30 seconds are a maximum time, and lowering it would lead to unneeded bug reports.
Title: Odp: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: mida on 15 09 2014, 19:24:00
ah ok, thanks.
i dont use one from it but i can alive with this 30 seconds  ;)
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: Wishmaster on 15 09 2014, 19:29:28
ah ok, thanks.
i dont use one from it but i can alive with this 30 seconds  ;)
Then there is no problem for you. If you get an ack after 2 seconds, it will be acknowledged. Its a maximum time. If you lower it, there will be much more wrong positives.
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: White-Tiger on 15 09 2014, 19:52:18
I would love to have it lower then 10 sec^^
It annoyed me a few times already when I actually knew the message cannot be send after 3 seconds but TabSRMM keeps waiting and blocking...

I can't describe what exactly happens, but it somehow blocks while trying to send.. so I couldn't do anything but wait
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: mida on 15 09 2014, 19:53:43
i didnt mean 2 seconds, more 10 or 15 seconds thats waiting for an ack and than looks how it works.
a own statistic how long tabsrmm every time is waiting would be interest for me ^^
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: Wishmaster on 15 09 2014, 20:53:12
Well, it is waiting as long as it gets an ack, but no longer then the maximum time. If you would set it to 3 seconds, it would cause many false positives when it needs more time.
It would make sense to set it per contact, but I don't think it's possible.

BTW mida:  "it looks how..." is wrong, "it looks like..." is correct instead. ;) Common false friend for germans :)
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: Vulpix on 16 09 2014, 11:50:41
For me, when I know the user is offline (i.e. on Tox), the workaround is to press CTRL+S and select "send later".

In this mode, all of the messages that you enter are queued for send later, circumventing the need to wait for the timeout and the prompt.

Still, the faux offline messaging (as outlined in the first post) is a better alternative, I think.
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: Robyer on 16 09 2014, 12:21:40
Well, now I think I'll lower that limit for TabSRMM. It doesn't make sense to force users such big limit. In Scriver it has minimum interval allowed to 4 seconds (default 10), so why it is so high in TabSRMM?

Edit: Done: http://trac.miranda-ng.org/changeset/10476/
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: Wishmaster on 16 09 2014, 12:30:56
Well, now I think I'll lower that limit for TabSRMM. It doesn't make sense to force users such big limit. In Scriver it has minimum interval allowed to 4 seconds (default 10), so why it is so high in TabSRMM?
Well, as I remember at least MSN needs such a limit:

From msn_svcs.cpp
Code: [Select]
        if (hContact == NULL)
        {
               if (MyOptions.SlowSend && strcmp(cws->szSetting, "MessageTimeout") == 0 &&
                  (strcmp(cws->szModule, "SRMM") == 0 || strcmp(cws->szModule, "SRMsg") == 0))
               {
                        if (cws->value.dVal < 60000)
                                      MessageBox(NULL, TranslateT("MSN requires message send timeout in your Message window plugin to be not less then 60 sec. Please correct the timeout value."),
                                        TranslateT("MSN Protocol"), MB_OK|MB_ICONINFORMATION);
                }
                return 0;
        }

And there are also p2p protocols like Tox, which may need it, I'm not sure about it.
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: Robyer on 16 09 2014, 12:35:55
Wishmaster, Hmm... well then it's up to user to set it as high as he need. But this forcing in MSN protocol is weird too. Don't you think?

I commited that change too fast, maybe we should get that default value back to 60 seconds for MSN, or remove/change that check in MSN. Because Scriver has default value of 10 seconds - which is imho ok.

Btw when that limit expires, it just show error, but until you close that error, that message still could be sent and showed in tabsrmm/scriver. That's also why I think this limit in MSN is stupid. (Also dead of MSN is very close.)
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: Wishmaster on 16 09 2014, 12:57:18
Btw when that limit expires, it just show error, but until you close that error, that message still could be sent and showed in tabsrmm/scriver. That's also why I think this limit in MSN is stupid. (Also dead of MSN is very close.)
Yes, this will obviously happen if you set that limit too low. So I think previous limit from tabsrmm was okay.  There can be many reasons why an ack takes longer time then usual.
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: mida on 16 09 2014, 16:27:45
Wishmaster, i know that my written english isnt perfect but hope that other understand me and if not than i try it a second time  ::)
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: Vulpix on 25 09 2014, 11:57:38
Back on topic, as my topic has been kinda hijacked... :D

Do you think this is implementable? Would it require a lot of work?

Quoting myself below:

Hello all!

I'm curious how difficult it would be to change / implement a so-called "faux offline messaging" into tabsrmm.

Currently, tabsrmm has an option to send later / retry / keep trying etc.  This is _almost_ good enough, but not quite.. since the time between attempts increases exponentially, and in the end, the plugin sort of gives up until you restart miranda (which is documented; I'm not saying this is a bad behavior).

What I'm looking for is the ability to handle offline messages like Skype used to:

Core features:

    Keep trying to deliver the message until it is received or cancelled by the sender or a long period of time passes.
    Only start trying when the target (contact) comes/is online (protocols that support offline messages don't _really_ need this feature)


Quality of life features:

    Automatically switch into "faux offline messaging" when talking to an offline contact of a protocol that does not support offline messaging.
    Possibly handle the message with its original timestamp, ie. so that it appears in the history at the time when it was sent


The advantage of this would be the protocol-independent nature of these messages, i.e. no support in protocol required for this to work. Kind of like FileAsMessage does file transfers over any protocol as well.

Thoughts?
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: Wishmaster on 25 09 2014, 12:58:11
Back on topic, as my topic has been kinda hijacked... :D

Do you think this is implementable? Would it require a lot of work?
Doesn't BuddyPounce do what you want? AFAIK TabSRMM supports it.

Anyways, I don't think it should be implemented in TabSRMM itsself. Telling people they must switch to TabSRMM just because they want to use that feature isn't a good idea, as most of them are overwhelmed with too many options.
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: Vulpix on 25 09 2014, 13:30:17
Hmm,

I looked into BuddyPounce and it _almost_ does what I need.

It's just inconvenient, I guess. The point of having it in tabsrmm would be to be more convenient. But yeah, pretty much buddypounce functionality, just "more apparent".

Sidenote:
This somewhat sheds light on a 'problem' of Miranda.

Plugin for offline messaging-ish is called "BuddyPounce"

Plugin for tabbed messaging is called "Tabsrmm"

A miranda newcomer (a friend of mine) complains to me all the time that the plugin names make no sense, because without knowing them already, you'll never know what the plugin does.
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: Wishmaster on 25 09 2014, 13:50:29
Hmm,

I looked into BuddyPounce and it _almost_ does what I need.

It's just inconvenient, I guess. The point of having it in tabsrmm would be to be more convenient. But yeah, pretty much buddypounce functionality, just "more apparent".
Well, I'm not sure if the Dropdown menu on the Send button supports BuddyPounce somehow. Is that the "almost"?
Sidenote:
This somewhat sheds light on a 'problem' of Miranda.

Plugin for offline messaging-ish is called "BuddyPounce"

Plugin for tabbed messaging is called "Tabsrmm"

A miranda newcomer (a friend of mine) complains to me all the time that the plugin names make no sense, because without knowing them already, you'll never know what the plugin does.

"BuddyPounce" is a little confusing, thats why there is a plugin list on the wiki. Im not sure if it makes sense to rename the plugin.
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: Vulpix on 25 09 2014, 14:47:02
D: buddy pounce crashes my miranda (no crash log). Latest dev buddy pounce + latest dev miranda. Every time the buddy comes on, miranda freezes.

Every time a contact for which I had scheduled a buddy message comes online, my miranda freezes.

Disabling the plugin for now; and really, it's too inconvenient. For offline messages to be worth it, the integration has to be seamless, i.e. you can just start typing to an offline contact like you would speak to an online contact; messages will be delivered when you're both online.

Buddy pounce is rather strange in how it works, and definitely doesn't work seamlessly.

I guess this would really need to be implemented in srmm plugins (like tabsrmm), as they are the ones responsible for message-handling.
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: Wishmaster on 25 09 2014, 15:49:05
BuddyPounce is a really old plugin, I'm not sure if it still works, and since almost every protocol used to support real offline messaging, there was not much interest in continuing it. Anyways, the message plugins would have to support such plugins, but they don't have to implement all of the code. I don't really like to duplicate code in all existing message plugins.
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: AnrDaemon on 04 10 2014, 15:38:48
The whole thread sounds like there needs to be a callback service in miranda to support such mechanics. A simple proxy that do nothing by default, with an option for plugin to hook onto it and provide any additional services it wishes.

@mida, you can always close the window and tell it "yeah, yeah, I know".
Title: Re: TabSRMM: Improve/rework "SendLater" to become faux offline messaging
Post by: Vulpix on 04 10 2014, 16:13:27
Well, I suppose my point with tabsrmm was - it pretty much supports this feature already, sort of. It's just not good for the purposes of faux offline messaging -i.e. it gives up too early, it doesn't send my stuff when I'm set as away etc.

Depends on whether someone has the time to look into this or not really; I believe it's a perfectly valid feature :)