Skip to content

Commit

Permalink
Socioboard3.0 Update
Browse files Browse the repository at this point in the history
1.Changes for adding new social profile in other group
2.Changes for reports
3.Changes in instagram reports-
i.  instagram follower
ii. instagram following
iii.instagram post likes
iv. instagram post comments
v.  instagram media
4.Changes in twitter reports
i.  daily engagement graph
ii. twitter retwitts
iii.twitter mentions
iv. twitter Favourite twittes
5.changes for group reports
i.   daily engagement graph
ii.  changes for palin text data in OUTBOUND TWEET CONTENT section
ii.  link to pages data in OUTBOUND TWEET CONTENT section
iii. Photo Links in OUTBOUND TWEET CONTENT section
iv.  changes in twitter states
6.Admin panel Loaders in all tabs
7.add loading circle in socioqueue, sent message
8.Add Load option for boardme,inside boardme and in inbox message
notification if it take time to fetch data
9.accounts payment status  showing paid in admin side, it should be
unpaid if user signup as free account
10.laod more option for smart inbox notification
11.changes for instagram comment in feeds
12.sign in page error msg
13.loader in dashboard
14.Modify all the error messages in Socioboard
15.Platinum sign in issue in pricing page
16.changes for instagram media in report
17.changes in get twitter follwer and follwing pagination part
  • Loading branch information
socioboard committed Feb 13, 2017
1 parent fd614ee commit ec7a4f5
Show file tree
Hide file tree
Showing 220 changed files with 35,749 additions and 2,569 deletions.
Binary file modified .vs/Socioboard/v14/.suo
Binary file not shown.
43 changes: 40 additions & 3 deletions .vs/restore.dg
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
#:D:\socioboardgithub\Socioboard-Core-3.0\src\Socioboard\Socioboard.xproj
D:\socioboardgithub\Socioboard-Core-3.0\src\Socioboard\Socioboard.xproj|D:\socioboardgithub\Socioboard-Core-3.0\src\Socioboard.Facebook\Socioboard.Facebook.xproj
D:\socioboardgithub\Socioboard-Core-3.0\src\Socioboard.Facebook\Socioboard.Facebook.xproj|D:\socioboardgithub\Socioboard-Core-3.0\src\Domain.Socioboard\Domain.Socioboard.xproj
#:E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Facebook\Socioboard.Facebook.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Facebook\Socioboard.Facebook.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Domain.Socioboard\Domain.Socioboard.xproj
#:E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard\Socioboard.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard\Socioboard.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Facebook\Socioboard.Facebook.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Facebook\Socioboard.Facebook.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Domain.Socioboard\Domain.Socioboard.xproj
#:E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Api.Socioboard\Api.Socioboard.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Api.Socioboard\Api.Socioboard.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Domain.Socioboard\Domain.Socioboard.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Api.Socioboard\Api.Socioboard.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Facebook\Socioboard.Facebook.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Api.Socioboard\Api.Socioboard.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Google\Socioboard.Google.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Api.Socioboard\Api.Socioboard.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Instagram\Socioboard.Instagram.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Api.Socioboard\Api.Socioboard.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.LinkedIn\Socioboard.LinkedIn.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Api.Socioboard\Api.Socioboard.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Twitter\Socioboard.Twitter.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Facebook\Socioboard.Facebook.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Domain.Socioboard\Domain.Socioboard.xproj
#:E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SocioboardDataServices\SocioboardDataServices.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SocioboardDataServices\SocioboardDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Domain.Socioboard\Domain.Socioboard.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SocioboardDataServices\SocioboardDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Facebook\Socioboard.Facebook.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SocioboardDataServices\SocioboardDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Google\Socioboard.Google.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SocioboardDataServices\SocioboardDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Instagram\Socioboard.Instagram.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SocioboardDataServices\SocioboardDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.LinkedIn\Socioboard.LinkedIn.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SocioboardDataServices\SocioboardDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Twitter\Socioboard.Twitter.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Facebook\Socioboard.Facebook.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Domain.Socioboard\Domain.Socioboard.xproj
#:E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SocioboardDataScheduler\SocioboardDataScheduler.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SocioboardDataScheduler\SocioboardDataScheduler.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Domain.Socioboard\Domain.Socioboard.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SocioboardDataScheduler\SocioboardDataScheduler.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Facebook\Socioboard.Facebook.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SocioboardDataScheduler\SocioboardDataScheduler.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Instagram\Socioboard.Instagram.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SocioboardDataScheduler\SocioboardDataScheduler.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.LinkedIn\Socioboard.LinkedIn.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SocioboardDataScheduler\SocioboardDataScheduler.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Twitter\Socioboard.Twitter.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Facebook\Socioboard.Facebook.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Domain.Socioboard\Domain.Socioboard.xproj
#:E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SociobordRssDataServices\SociobordRssDataServices.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SociobordRssDataServices\SociobordRssDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Domain.Socioboard\Domain.Socioboard.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SociobordRssDataServices\SociobordRssDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Facebook\Socioboard.Facebook.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SociobordRssDataServices\SociobordRssDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Instagram\Socioboard.Instagram.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SociobordRssDataServices\SociobordRssDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.LinkedIn\Socioboard.LinkedIn.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SociobordRssDataServices\SociobordRssDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Twitter\Socioboard.Twitter.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Facebook\Socioboard.Facebook.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Domain.Socioboard\Domain.Socioboard.xproj
#:E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Domain.Socioboard\Domain.Socioboard.xproj
#:E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Instagram\Socioboard.Instagram.xproj
#:E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Twitter\Socioboard.Twitter.xproj
#:E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.LinkedIn\Socioboard.LinkedIn.xproj
#:E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Google\Socioboard.Google.xproj
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.0-preview2-003133"
"version": "1.0.0-preview2-003131"
}
}
49 changes: 33 additions & 16 deletions src/Api.Socioboard/Controllers/FacebookController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ public IActionResult AddFacebookPages(long userId, long groupId)
string data = Request.Form["profileaccesstoken"];
string[] accesstoken = data.Split(',');
int addedPageCount = 0;
int invalidaccessToken = 0;
foreach (var item in accesstoken)
{
dynamic profile = Fbpages.getFbPageData(item);
Expand All @@ -305,30 +306,46 @@ public IActionResult AddFacebookPages(long userId, long groupId)
catch { }
if (Convert.ToString(profile) == "Invalid Access Token")
{
return Ok("Invalid Access Token");
invalidaccessToken++;
// return Ok("Invalid Access Token");
}
DatabaseRepository dbr = new DatabaseRepository(_logger, _env);
Domain.Socioboard.Models.Facebookaccounts fbacc = Api.Socioboard.Repositories.FacebookRepository.getFacebookAccount(Convert.ToString(profile["id"]), _redisCache, dbr);
if (fbacc != null && fbacc.IsActive == true)
{
addedPageCount++;
//return Ok("Facebook Page added by other user.");
}
else
else
{
Groups ngrp = dbr.Find<Domain.Socioboard.Models.Groups>(t => t.adminId == userId && t.id == groupId).FirstOrDefault();
if (ngrp == null)
DatabaseRepository dbr = new DatabaseRepository(_logger, _env);
Domain.Socioboard.Models.Facebookaccounts fbacc = Api.Socioboard.Repositories.FacebookRepository.getFacebookAccount(Convert.ToString(profile["id"]), _redisCache, dbr);
if (fbacc != null && fbacc.IsActive == true)
{
return Ok("Wrong Group Id");
addedPageCount++;
//return Ok("Facebook Page added by other user.");
}
// Adding Facebook Page
int res = Api.Socioboard.Repositories.FacebookRepository.AddFacebookPage(profile, dbr, userId, ngrp.id, Domain.Socioboard.Enum.FbProfileType.FacebookPage, item, _redisCache, _appSettings, _logger);

else
{
Groups ngrp = dbr.Find<Domain.Socioboard.Models.Groups>(t => t.adminId == userId && t.id == groupId).FirstOrDefault();
if (ngrp == null)
{
return Ok("Wrong Group Id");
}
// Adding Facebook Page
int res = Api.Socioboard.Repositories.FacebookRepository.AddFacebookPage(profile, dbr, userId, ngrp.id, Domain.Socioboard.Enum.FbProfileType.FacebookPage, item, _redisCache, _appSettings, _logger);

}
}
}
if (addedPageCount == accesstoken.Length)
{
return Ok("Facebook Page added by other user.");
return Ok("Facebook Pages added by other user.");
}
else if(addedPageCount == accesstoken.Length)
{
return Ok("Facebook Pages having Invalid Access Token.");
}
else if (invalidaccessToken > 0 && addedPageCount>0)
{
return Ok("Pages added successfully and " + addedPageCount + " pages added by other user or " + invalidaccessToken + " pages having invalid access token issue");
}
else if (invalidaccessToken > 0)
{
return Ok("Pages added successfully" + invalidaccessToken + " pages having invalid access token issue");
}
else if (addedPageCount > 0)
{
Expand Down
1 change: 1 addition & 0 deletions src/Api.Socioboard/Controllers/RssFeedController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public IActionResult GetPostedRssDataByUser(long userId, long groupId)
{
DatabaseRepository dbr = new DatabaseRepository(_logger, _env);
List<Domain.Socioboard.Models.Mongo.RssFeed> lstRss = Repositories.RssFeedRepository.GetPostedRssDataByUser(userId, groupId, _appSettings, dbr);
lstRss = lstRss.Where(t => !string.IsNullOrEmpty(t.Message)).ToList();
return Ok(lstRss);
}

Expand Down
87 changes: 70 additions & 17 deletions src/Api.Socioboard/Controllers/UserController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,18 +256,45 @@ public IActionResult GetUser(Int64 Id)
public IActionResult GetPaidUserAdmin()
{
DatabaseRepository dbr = new DatabaseRepository(_logger, _appEnv);
List<User>user = dbr.Find<User>(t => t.PaymentStatus == Domain.Socioboard.Enum.SBPaymentStatus.Paid).ToList();
if (user != null)
{
return Ok(user);
}
else

// List<User>user = dbr.Find<User>(t => t.PaymentStatus == Domain.Socioboard.Enum.SBPaymentStatus.Paid).ToList();
// List<User> user=dbr.GetUser().Where(t => t.PaymentStatus == Domain.Socioboard.Enum.SBPaymentStatus.Paid).ToList();
List<Domain.Socioboard.Models.PiadUser> paidUser = new List<PiadUser>();
string month = string.Empty;
DateTime date = DateTime.UtcNow.AddDays(-(DateTime.UtcNow.Day - 1)).AddMonths(-11);
do
{
return NotFound();
}
try
{
Domain.Socioboard.Models.PiadUser _paidUser = new PiadUser();
// List<User> results = dbr.Find<User>(t => t.CreateDate.Date > date.Date && t.CreateDate.Date < date.AddMonths(1).Date && t.PaymentStatus == Domain.Socioboard.Enum.SBPaymentStatus.Paid).ToList();
int PaidUserCount = dbr.GetCount<User>(t => t.CreateDate.Date > date.Date && t.CreateDate.Date < date.AddMonths(1).Date && t.PaymentStatus == Domain.Socioboard.Enum.SBPaymentStatus.Paid);
_paidUser.month = date.ToString("MMM yy");
_paidUser.paiduser = PaidUserCount;
paidUser.Add(_paidUser);
}
catch (Exception ex)
{
Domain.Socioboard.Models.PiadUser _paidUser = new PiadUser();
_paidUser.month = date.ToString("MMM yy");
_paidUser.paiduser = 0;
paidUser.Add(_paidUser);
}


date = date.AddMonths(1);
}
while (DateTime.Now.AddMonths(1).Month != date.Month);
//if (user != null)
//{
// return Json(user);
//}
//else
//{
// return NotFound();
//}

return Json(paidUser);

// return strPaidUserCount.TrimEnd(',') + "_#_" + strUnPaidUserCount.TrimEnd(',') + "_#_" + month;

Expand All @@ -284,16 +311,38 @@ public IActionResult GetUnPaidUserAdmin()
{
DatabaseRepository dbr = new DatabaseRepository(_logger, _appEnv);

List<User> user = dbr.Find<User>(t => t.PaymentStatus == Domain.Socioboard.Enum.SBPaymentStatus.UnPaid).ToList();
if (user != null)
{
return Ok(user);
}
else
//List<User> user = dbr.Find<User>(t => t.PaymentStatus == Domain.Socioboard.Enum.SBPaymentStatus.UnPaid).ToList();
//if (user != null)
//{
// return Json(user);
//}
//else
//{
// return NotFound();
//}
List<Domain.Socioboard.Models.UnPiadUser> paidUser = new List<UnPiadUser>();
string month = string.Empty;
DateTime date = DateTime.UtcNow.AddDays(-(DateTime.UtcNow.Day - 1)).AddMonths(-11);
do
{
return NotFound();
}
try
{
Domain.Socioboard.Models.UnPiadUser _paidUser = new UnPiadUser();
int unPiadUserCount= dbr.GetCount<User>(t => t.CreateDate > date.Date && t.CreateDate < date.AddMonths(1).Date && t.PaymentStatus == Domain.Socioboard.Enum.SBPaymentStatus.UnPaid);
_paidUser.month = date.ToString("MMM yy");
_paidUser.Unpaiduser = unPiadUserCount;
paidUser.Add(_paidUser);
}
catch (Exception ex)
{

}


date = date.AddMonths(1);
}
while (DateTime.Now.AddMonths(1).Month != date.Month);
return Json(paidUser);
}

[HttpPost("AdminAddNewsLetter")]
Expand Down Expand Up @@ -1465,6 +1514,10 @@ public IActionResult UpdateFreeUser(string userId)
if (_user != null)
{
_user.PaymentStatus = Domain.Socioboard.Enum.SBPaymentStatus.Paid;
if(_user.AccountType==Domain.Socioboard.Enum.SBAccountType.Free)
{
_user.PaymentStatus = Domain.Socioboard.Enum.SBPaymentStatus.UnPaid;
}
_user.ExpiryDate = DateTime.UtcNow.AddDays(30);
_user.Id = Convert.ToInt64(userId);
dbr.Update<User>(_user);
Expand Down
Loading

0 comments on commit ec7a4f5

Please sign in to comment.