Allow invites without a accept_url element
This commit is contained in:
parent
1b2fb55aa4
commit
331c51b144
|
@ -155,6 +155,7 @@ namespace SparkleShare {
|
|||
|
||||
if (invite.Valid) {
|
||||
InviteReceived (invite);
|
||||
File.Delete (args.FullPath);
|
||||
|
||||
} else {
|
||||
if (AlertNotificationRaised != null)
|
||||
|
@ -162,7 +163,6 @@ namespace SparkleShare {
|
|||
"This invite seems screwed up...");
|
||||
}
|
||||
|
||||
File.Delete (args.FullPath);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -34,8 +34,7 @@ namespace SparkleShare {
|
|||
public bool Valid {
|
||||
get {
|
||||
return (!string.IsNullOrEmpty (Address) &&
|
||||
!string.IsNullOrEmpty (RemotePath) &&
|
||||
!string.IsNullOrEmpty (AcceptUrl.ToString ()));
|
||||
!string.IsNullOrEmpty (RemotePath));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,6 +78,9 @@ namespace SparkleShare {
|
|||
|
||||
public bool Accept ()
|
||||
{
|
||||
if (AcceptUrl == null)
|
||||
return true;
|
||||
|
||||
try {
|
||||
WebRequest request = WebRequest.Create (AcceptUrl);
|
||||
|
||||
|
@ -114,13 +116,7 @@ namespace SparkleShare {
|
|||
|
||||
|
||||
private void Initialize (string address, string remote_path, string accept_url)
|
||||
{/*
|
||||
if (!remote_path.StartsWith ("/"))
|
||||
remote_path = "/" + remote_path;
|
||||
|
||||
if (!address.EndsWith ("/"))
|
||||
address = address + "/";
|
||||
*/
|
||||
{
|
||||
Address = address;
|
||||
RemotePath = remote_path;
|
||||
AcceptUrl = new Uri (accept_url);
|
||||
|
|
Loading…
Reference in a new issue