I am building a module which creates a user friend request and sends a notification to the requested user, so far so good. However when the requested user clicks 'Accept' on their notification there is an error.
I have created a service as per the 6.2 quick start guide and have tested a hello world service. Next I took the Memeber Directory service called AcceptFriend and added it to my modules service class. Everything should be wired up proper so I think the issue is that I am not getting the required data over to the service
the service is looking for friendId as per below.
public ActionResult AcceptFriend(int friendId)
my notification looks like this
protected void sendFriendNotification()
{
var notificationType = NotificationsController.Instance.GetNotificationType("myFriendRequest");
var subject = "You have a Friend Request from " + UserInfo.DisplayName;
var body = Localization.GetString("FriendRequestBody", LocalResourceFile);
var sender = base.UserId; // Get the user that sends the notification.
var notification = new Notification
{
NotificationTypeID = notificationType.NotificationTypeId,
Subject = subject,
Body = body,
IncludeDismissAction = true,
SenderUserID = sender,
Context = ""
};
NotificationsController.Instance.SendNotification(notification, PortalSettings.PortalId, null, FriendList);
}
How might I pass friendId ?
Thanks for the help