Skip to content

Commit

Permalink
socioboard Updated 3.0
Browse files Browse the repository at this point in the history
github commit
-------------------
-Get In Touch Implemented
-After linkedin page selector closes again it will show after comeback
from anathor module issue fixed
-After connect with FB pages box closes again it will show after
comeback from anathor module issue fixed
-Last RSS queue is not get deleted issue fixed
-Mytask comments sending issue fixed
-Mytask send comments starting with # tags changes message issue fixed
-Linked company page feeds task assign issue fixed
-Next line comment in youtube feeds issue fixed
-Dashboard login something went wrong issue fixed
-dashboard loading issue fixed.
-facebook and instagram feed loading issue fixed.
-sharethon issue fixed.
-Thumbnail of the compose messages of linked in accounts and company
pages image issue fixed
-Draft message edit text box issue fixed
-Draft message edit value '#' character issue fixed
-Linked in pages connect even after check box is unselected issue fixed
-multiple special character comment in my task issue fixed
-Dashboard pinterest profile name issue fixed
-Update email which one already associated with socioboard account issue
fixed
-After youtube channels adding confirmation page opens the page close
issue fixed
-Youtube channel added repeatedly in same socioboard account issue fixed
-Get in touch subject space issue fixed
-Get in touch help mail message sending user issue fixed
-changes in linkdin profile issue
-content tag issue in rss news
-ui changes in sign in model
-changes in compose message
-compose message issue linkdin design feeds and facebook feeds
-fix all module resocio problem
-Fixed ads offer issue
-Some changes in UI
-More ads options in always free plan
-Changes for group restriction
  • Loading branch information
socioboard committed Jul 24, 2017
1 parent d3d57e6 commit 1fb75ae
Show file tree
Hide file tree
Showing 190 changed files with 4,403 additions and 4,374 deletions.
31 changes: 17 additions & 14 deletions src/Api.Socioboard/Controllers/DraftMessageController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,24 @@ public IActionResult EditDraftMessage(long draftId, long userId, long GroupId,st
{
if (!string.IsNullOrEmpty(item))
{
if (item.Contains("hhh"))
if (item.Contains("hhh") || item.Contains("nnn") || item.Contains("ppp") || item.Contains("jjj"))
{
postmessage = postmessage + item.Replace("hhh", "#");
}
if (item.Contains("nnn"))
{
postmessage = postmessage.Replace("nnn", "&");
}
if (item.Contains("ppp"))
{
postmessage = postmessage.Replace("ppp", "+");
}
if (item.Contains("jjj"))
{
postmessage = postmessage.Replace("jjj", "-+");
if (item.Contains("hhh"))
{
postmessage = postmessage + item.Replace("hhh", "#");
}
if (item.Contains("nnn"))
{
postmessage = postmessage.Replace("nnn", "&");
}
if (item.Contains("ppp"))
{
postmessage = postmessage.Replace("ppp", "+");
}
if (item.Contains("jjj"))
{
postmessage = postmessage.Replace("jjj", "-+");
}
}
else
{
Expand Down
34 changes: 18 additions & 16 deletions src/Api.Socioboard/Controllers/FacebookController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,22 +227,24 @@ public IActionResult GetTopFeeds(string profileId, long userId, int skip, int co
});
IList<Domain.Socioboard.Models.Mongo.MongoFacebookFeed> lstFbFeeds = task.Result;

foreach (var item in lstFbFeeds.ToList())
{
Domain.Socioboard.Models.Mongo.facebookfeed _intafeed = new Domain.Socioboard.Models.Mongo.facebookfeed();
MongoRepository mongorepocomment = new MongoRepository("MongoFbPostComment", _appSettings);
var resultcomment = mongorepocomment.Find<Domain.Socioboard.Models.Mongo.MongoFbPostComment>(t => t.PostId == item.FeedId);
var taskcomment = Task.Run(async () =>
{
return await resultcomment;
});
IList<Domain.Socioboard.Models.Mongo.MongoFbPostComment> lstFbPostComment = taskcomment.Result;
lstFbPostComment = lstFbPostComment.OrderByDescending(t => t.Commentdate).ToList();
_intafeed._facebookFeed = item;
_intafeed._facebookComment = lstFbPostComment.ToList();
lstfacebookfeed.Add(_intafeed);
}
return Ok(lstfacebookfeed);
//foreach (var item in lstFbFeeds.ToList())
//{
// Domain.Socioboard.Models.Mongo.facebookfeed _intafeed = new Domain.Socioboard.Models.Mongo.facebookfeed();
// MongoRepository mongorepocomment = new MongoRepository("MongoFbPostComment", _appSettings);
// var buildecommentr = Builders<Domain.Socioboard.Models.Mongo.MongoFbPostComment>.Sort;
// var sortcomment = buildecommentr.Descending(t => t.Likes);
// var resultcomment = mongorepocomment.FindWithRange<Domain.Socioboard.Models.Mongo.MongoFbPostComment>(t => t.PostId == item.FeedId, sortcomment, skip,5);
// var taskcomment = Task.Run(async () =>
// {
// return await resultcomment;
// });
// IList<Domain.Socioboard.Models.Mongo.MongoFbPostComment> lstFbPostComment = taskcomment.Result;
// lstFbPostComment = lstFbPostComment.OrderByDescending(t => t.Commentdate).ToList();
// _intafeed._facebookFeed = item;
// _intafeed._facebookComment = lstFbPostComment.ToList();
// lstfacebookfeed.Add(_intafeed);
//}
return Ok(lstFbFeeds.ToList());

}
// return Ok();
Expand Down
74 changes: 74 additions & 0 deletions src/Api.Socioboard/Controllers/GetInTouchController.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Api.Socioboard/Controllers/GoogleController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ public IActionResult GetYoutubeAccount(string code, long groupId, long userId)
List<Domain.Socioboard.ViewModels.YoutubeProfiles> lstYoutubeProfiles = new List<Domain.Socioboard.ViewModels.YoutubeProfiles>();
DatabaseRepository dbr = new DatabaseRepository(_logger, _appEnv);
lstYoutubeProfiles = Helper.GoogleHelper.GetYoutubeAccount(code, _appSettings,dbr);
List<Domain.Socioboard.Models.Groupprofiles> lstGrpProfiles = Repositories.GroupProfilesRepository.getGroupProfiles(groupId, _redisCache, dbr);
List<Domain.Socioboard.Models.Groupprofiles> lstGrpProfiles = Repositories.GroupProfilesRepository.getAllGroupProfiles(groupId, _redisCache, dbr);
lstGrpProfiles = lstGrpProfiles.Where(t => t.profileType == Domain.Socioboard.Enum.SocialProfileType.YouTube).ToList();
string[] lstStr = lstGrpProfiles.Select(t => t.profileId).ToArray();
if (lstStr.Length > 0)
Expand Down
8 changes: 8 additions & 0 deletions src/Api.Socioboard/Controllers/GroupProfilesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ public IActionResult GetAllGroupProfiles(long groupId)
DatabaseRepository dbr = new DatabaseRepository(_logger, _appEnv);
return Ok(GroupProfilesRepository.getAllGroupProfiles(groupId, _redisCache, dbr));
}
[HttpGet("GetAllGroupProfilesCount")]
public IActionResult GetAllGroupProfilesCount(long groupId)
{
DatabaseRepository dbr = new DatabaseRepository(_logger, _appEnv);
return Ok(GroupProfilesRepository.GetAllGroupProfilesCount(groupId, _redisCache, dbr));
}

[HttpGet("GetTop3GroupProfiles")]
public IActionResult GetTop3GroupProfiles(long groupId)
Expand Down Expand Up @@ -324,5 +330,7 @@ public IActionResult GetPluginProfile(long groupId)
}
return Ok(lstPluginProfile);
}


}
}
46 changes: 31 additions & 15 deletions src/Api.Socioboard/Controllers/GroupsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ public GroupsController(ILogger<UserController> logger, IEmailSender emailSender
public IActionResult CreateGroup(Domain.Socioboard.Models.Groups group)
{
DatabaseRepository dbr = new DatabaseRepository(_logger, _appEnv);
if(dbr.Find<Domain.Socioboard.Models.Groups>(t=>t.adminId == group.adminId && t.groupName.Equals(group.groupName)).Count > 0)
if (dbr.Find<Domain.Socioboard.Models.Groups>(t => t.adminId == group.adminId && t.groupName.Equals(group.groupName)).Count > 0)
{
return Ok("Group Name Already Exist");
}
group.createdDate = System.DateTime.UtcNow;
int res = dbr.Add<Domain.Socioboard.Models.Groups>(group);
int res = dbr.Add<Domain.Socioboard.Models.Groups>(group);

if(res == 1)
if (res == 1)
{
Domain.Socioboard.Models.User user = dbr.FindSingle<User>(t => t.Id == group.adminId);
long GroupId = dbr.FindSingle<Domain.Socioboard.Models.Groups>(t => t.adminId == group.adminId && t.groupName.Equals(group.groupName)).id;
Expand Down Expand Up @@ -77,8 +77,24 @@ public IActionResult IsGroupExist(string groupName, long userId)
[HttpGet("GetUserGroups")]
public IActionResult GetUserGroups(long userId)
{
DatabaseRepository dbr = new DatabaseRepository(_logger,_appEnv);
return Ok(GroupsRepository.getAllGroupsofUser(userId, _redisCache, dbr));
DatabaseRepository dbr = new DatabaseRepository(_logger, _appEnv);
return Ok(GroupsRepository.getAllGroupsofUser(userId, _redisCache, dbr));
}


[HttpGet("GetUserGroupData")]
public IActionResult GetUserGroupData(long userId)
{
DatabaseRepository dbr = new Model.DatabaseRepository(_logger, _appEnv);
Domain.Socioboard.Models.GetUserGroupData _GetUserGroupData = new Domain.Socioboard.Models.GetUserGroupData();
List<Domain.Socioboard.Models.Groups> lstgroup = dbr.Find<Domain.Socioboard.Models.Groups>(t => t.adminId == userId).ToList();
long[] lstStr = lstgroup.Select(t => t.id).ToArray();
List<Domain.Socioboard.Models.Groupprofiles> lstgrpProfiles = dbr.Find<Domain.Socioboard.Models.Groupprofiles>(t => lstStr.Contains(t.groupId)).ToList();

Dictionary<long, List<Groupprofiles>> myProfiles = lstgrpProfiles.GroupBy(o => o.groupId).ToDictionary(g => g.Key, g => g.ToList());
_GetUserGroupData.lstgroup = lstgroup;
_GetUserGroupData.myProfiles = myProfiles;
return Ok(_GetUserGroupData);
}

[HttpGet("GetUserGroupsCount")]
Expand All @@ -94,7 +110,7 @@ public IActionResult AddSelectedGroups(long userId)
string selectedGroups = Request.Form["selectedGroups"];
string[] Profiles = selectedGroups.Split(',');
List<string> temp = new List<string>();
foreach(string item in Profiles)
foreach (string item in Profiles)
{
temp.Add(item);
}
Expand All @@ -103,14 +119,14 @@ public IActionResult AddSelectedGroups(long userId)
DatabaseRepository dbr = new DatabaseRepository(_logger, _appEnv);
List<Domain.Socioboard.Models.Groups> lstSBGrp = Repositories.GroupsRepository.getGroups(userId, _redisCache, dbr);
long SBgroupId = lstSBGrp.First().id;
List<Domain.Socioboard.Models.Groupmembers> lstGrpmember = Repositories.GroupMembersRepository.findmember(SBgroupId,userId, _redisCache, dbr);
foreach(Domain.Socioboard.Models.Groupmembers member in lstGrpmember)
List<Domain.Socioboard.Models.Groupmembers> lstGrpmember = Repositories.GroupMembersRepository.findmember(SBgroupId, userId, _redisCache, dbr);
foreach (Domain.Socioboard.Models.Groupmembers member in lstGrpmember)
{
if(member.isAdmin==true)
if (member.isAdmin == true)
{
List<Domain.Socioboard.Models.Groups> lstGrp = Repositories.GroupsRepository.getAdminGroupsofUser(member.userId, _redisCache, dbr);
lstGrp = lstGrp.Where(t => !temp.Contains(t.groupName)).ToList();
if(lstGrp.Count !=0)
if (lstGrp.Count != 0)
{
foreach (Domain.Socioboard.Models.Groups item in lstGrp)
{
Expand All @@ -128,7 +144,7 @@ public IActionResult AddSelectedGroups(long userId)
}
}
}

}
else
{
Expand All @@ -144,15 +160,15 @@ public IActionResult AddSelectedGroups(long userId)
}
else
{
Groupmembers nusers = dbr.Single<Groupmembers>(t => t.groupid==items.id && t.userId==userId);
Groupmembers nusers = dbr.Single<Groupmembers>(t => t.groupid == items.id && t.userId == userId);
dbr.Delete<Domain.Socioboard.Models.Groupmembers>(nusers);
}
}
}
//Groupmembers nuser = dbr.Single<Groupmembers>(t => t.groupid.Equals(member.groupid));
//Groupmembers nuser = dbr.Single<Groupmembers>(t => t.groupid.Equals(member.groupid));

}

}
return Ok();
}
Expand Down
38 changes: 20 additions & 18 deletions src/Api.Socioboard/Controllers/InstagramController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public IActionResult GetInstagramFeeds(long userId,string instagramId, int skip,
{
if (skip + count < 100)
{
List<Domain.Socioboard.Models.Mongo.intafeed> lstInstagramFeeds = Repositories.InstagramRepository.GetInstagramFeeds(instagramId, _appSettings, _redisCache);
List<Domain.Socioboard.Models.Mongo.InstagramFeed> lstInstagramFeeds = Repositories.InstagramRepository.GetInstagramFeeds(instagramId, _appSettings, _redisCache,skip,count);
return Ok(lstInstagramFeeds);
}
else
Expand All @@ -103,21 +103,23 @@ public IActionResult GetInstagramFeeds(long userId,string instagramId, int skip,
return await ret;
});
IList<Domain.Socioboard.Models.Mongo.InstagramFeed> _lstInstagramFeed = task.Result;
foreach (var item in _lstInstagramFeed.ToList())
{
Domain.Socioboard.Models.Mongo.intafeed _intafeed = new Domain.Socioboard.Models.Mongo.intafeed();
MongoRepository InstagramCommentRepo = new MongoRepository("InstagramComment", _appSettings);
var ret1 = InstagramCommentRepo.Find<Domain.Socioboard.Models.Mongo.InstagramComment>(t => t.FeedId.Equals(item.FeedId));
var taskq = Task.Run(async () =>
{
return await ret1;
});
IList<Domain.Socioboard.Models.Mongo.InstagramComment> _lstInstagramComment = taskq.Result;
_intafeed._InstagramFeed = item;
_intafeed._InstagramComment = _lstInstagramComment.ToList();
lstintafeed.Add(_intafeed);
}
return Ok(lstintafeed.OrderByDescending(t=>t._InstagramFeed.FeedDate));
//foreach (var item in _lstInstagramFeed.ToList())
//{
// Domain.Socioboard.Models.Mongo.intafeed _intafeed = new Domain.Socioboard.Models.Mongo.intafeed();
// MongoRepository InstagramCommentRepo = new MongoRepository("InstagramComment", _appSettings);
// var builderComment = Builders<Domain.Socioboard.Models.Mongo.InstagramComment>.Sort;
// var sortcomment = builderComment.Descending(t => t.CommentDate);
// var ret1 = InstagramCommentRepo.FindWithRange<Domain.Socioboard.Models.Mongo.InstagramComment>(t => t.FeedId.Equals(item.FeedId),sortcomment,skip,5);
// var taskq = Task.Run(async () =>
// {
// return await ret1;
// });
// IList<Domain.Socioboard.Models.Mongo.InstagramComment> _lstInstagramComment = taskq.Result;
// _intafeed._InstagramFeed = item;
// _intafeed._InstagramComment = _lstInstagramComment.ToList();
// lstintafeed.Add(_intafeed);
//}
return Ok(_lstInstagramFeed.OrderByDescending(t=>t.FeedDate));
}

}
Expand All @@ -126,14 +128,14 @@ public IActionResult GetInstagramFeeds(long userId,string instagramId, int skip,
[HttpGet("GetInstagramFilterFeeds")]
public IActionResult GetInstagramFilterFeeds(long userId, string instagramId, int skip, int count, string postType)
{
List<Domain.Socioboard.Models.Mongo.intafeed> lstInstagramFeeds = Repositories.InstagramRepository.GetTopInstagramFilterFeed(instagramId, _appSettings, _redisCache, skip, count, postType);
List<Domain.Socioboard.Models.Mongo.InstagramFeed> lstInstagramFeeds = Repositories.InstagramRepository.GetTopInstagramFilterFeed(instagramId, _appSettings, _redisCache, skip, count, postType);
return Ok(lstInstagramFeeds);
}

[HttpGet("GetInstagramSortFeeds")]
public IActionResult GetInstagramSortFeeds(long userId, string instagramId, int skip, int count, string sortType)
{
List<Domain.Socioboard.Models.Mongo.intafeed> lstInstagramFeeds = Repositories.InstagramRepository.GetTopInstagramSortFeed(instagramId, _appSettings, _redisCache, skip, count, sortType);
List<Domain.Socioboard.Models.Mongo.InstagramFeed> lstInstagramFeeds = Repositories.InstagramRepository.GetTopInstagramSortFeed(instagramId, _appSettings, _redisCache, skip, count, sortType);
return Ok(lstInstagramFeeds);
}

Expand Down
9 changes: 9 additions & 0 deletions src/Api.Socioboard/Controllers/RssFeedController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,15 @@ public IActionResult AddRssUrl(long userId, long groupId, string rssUrl, string
return Ok("Added Successfully");
}

[HttpPost("PostRssFeeds")]
public IActionResult PostRssFeeds(string profileId, string userId, string rssUrl)
{
DatabaseRepository dbr = new DatabaseRepository(_logger, _env);
string ret = Repositories.RssFeedRepository.PostRssfeed(profileId, rssUrl, _appSettings, dbr, _redisCache);
return Ok(ret);
}


[HttpGet("GetPostedRssDataByUser")]
public IActionResult GetPostedRssDataByUser(long userId, long groupId)
{
Expand Down
Loading

0 comments on commit 1fb75ae

Please sign in to comment.