scudcloud icon indicating copy to clipboard operation
scudcloud copied to clipboard

Notification Popup URL Issue

Open jasonkuehl opened this issue 10 years ago • 23 comments

selection_008

When a URL is sent that is to long it will leave off the ending add a ... at the end in the Notification message. Once it does that if you can click on the URL in the notification it will leave of the last part of the URL that was behind the ...

selection_009

I'm explaining this horrible. So I attached pictures.

jasonkuehl avatar Dec 03 '15 19:12 jasonkuehl

I also have this problem, I was just coming here to file an issue, funny that someone made one just 5 hours before me.

PaulFurtado avatar Dec 03 '15 23:12 PaulFurtado

Hi @jasonkuehl and @PaulFurtado, thanks for reporting this issue.

Sorry, can you confirm the problem? When you click in the notification, the link opened in browser is the shortened one with the appended ...?

So, something like http://www.example.com?abc=def (if it was too long, of course) will turn http://example.com?abc=..., is that?

raelgc avatar Dec 03 '15 23:12 raelgc

Yes, correct. @raelgc . When you click on the notification it will open a web browser to http://example.com?abc= not the intended http://www.example.com?abc=def

@PaulFurtado You're also in Boston, ,maybe its a location issue :P

jasonkuehl avatar Dec 04 '15 01:12 jasonkuehl

What desktop environment are you guys using?

raelgc avatar Dec 04 '15 11:12 raelgc

@raelgc Ubuntu 15.04 with Cinnamon

jasonkuehl avatar Dec 04 '15 14:12 jasonkuehl

@raelgc gnome-shell here

PaulFurtado avatar Dec 04 '15 16:12 PaulFurtado

This issue is a problem... because the notification system is turning the URL in a hyperlink, not ScudCloud.

raelgc avatar Dec 16 '15 01:12 raelgc

@raelgc thanks for looking into it. Other messaging apps do get around this issue (the URL will appear truncated, but the hyperlink remains intact), so there must be a hack. Is scudcloud truncating the text or is it the notification system?

PaulFurtado avatar Dec 16 '15 01:12 PaulFurtado

ScudCloud is getting the Slack notification directly and sending to system. So, or Slack is truncating or notification system. Probably if we add a simple print to notify.py we'll discover.

raelgc avatar Dec 16 '15 01:12 raelgc

Interesting, I did know that’s how SC worked even from looking over the code. I think the Print idea would work however.

jasonkuehl avatar Dec 16 '15 13:12 jasonkuehl

Can you guys tweak notify.py and add a print of the notification, then paste it here, please?

raelgc avatar Feb 16 '16 19:02 raelgc

I only see notifier.py and notify2.py

[15991:2253 0:3033] 03:16:33 Tue Feb 16 [jkuehl@TheDestroyer: +1] /usr/lib/python3/dist-packages/scudcloud (1:3033)$ cat notif notifier.py
notify2.py

jasonkuehl avatar Feb 16 '16 20:02 jasonkuehl

@jasonkuehl My bad: notifier.py.

raelgc avatar Feb 16 '16 21:02 raelgc

I just published a new version (1.16) where if you start with scudcloud --debug=True you'll be able to see the notification printed in the command line.

raelgc avatar Feb 17 '16 09:02 raelgc

Notification: title [New message from GUY] message [what-if.xkcd.com/...] icon [/tmp/scudcloud_U08U4Q96C.png]

(1:3173)$ scudcloud --version ScudCloud 1.16 Python 3.4.3 Qt 4.8.6 PyQt 4.11.3 SIP 4.16.6

selection_210-edit

With change you can no longer click on the notification to open the URL.

jasonkuehl avatar Feb 17 '16 19:02 jasonkuehl

Notification: title [New message from GUY] message [what-if.xkcd.com/...] icon [/tmp/scudcloud_U08U4Q96C.png] Notification: title [New message from GUY] message [what-if.xkcd.com/...] icon [/tmp/scudcloud_U08U4Q96C.png] sys:1: Warning: Source ID 101 was not found when attempting to remove it URL Changed: https://Place.slack.com/messages/@GUY/

jasonkuehl avatar Feb 17 '16 19:02 jasonkuehl

Interesting, as this is printing the pure notification received from Slack... it appears that Slack is cutting the URL.

raelgc avatar Feb 17 '16 19:02 raelgc

Yeah This was my thinking as well. The odd thing is if you install the slack client for mac / windows this wont happen. It will open the full URL.

jasonkuehl avatar Feb 17 '16 19:02 jasonkuehl

Thanks for all this info, @jasonkuehl.

My guess is: during the init process, ScudCloud pass few configurations to Slack. One of them is to tell Slack that ScudCloud doesn't support HTML notifications (in fact, only because the first version was built with Ubuntu in mind).

So, can you test change this setup?

Please, edit /usr/lib/python3/dist-packages/scudcloud/resources/scudcloud.js and change this:

canShowHtmlNotifications:function(){return!1}

by this?

canShowHtmlNotifications:function(){return true}

Of course, close and re-open ScudCloud and test notifications again.

raelgc avatar Feb 17 '16 19:02 raelgc

@jasonkuehl Any lucky?

raelgc avatar Feb 18 '16 17:02 raelgc

@raelgc Sorry I’ve been travelling for work. Ill be able to test later on tonight.

jasonkuehl avatar Feb 18 '16 20:02 jasonkuehl

Same thing @raelgc

selection_214

jasonkuehl avatar Feb 19 '16 13:02 jasonkuehl

Yep @raelgc... did the same locally with top of tree. Here is the log message: Notification: title [brent] message [sure - bit.ly/IqT6zt...] icon [/tmp/scudcloud_U02FC499T.jpg]. That is with the suggested change.

stieg avatar Feb 29 '16 02:02 stieg