Notifications for tagged user/friend in Text Area of Wall.

Nik Fury Posted in Component Development 3 years ago

Many Thanks Arsalan for assisting me in tagging friends in wall post. Iam trying to make notifications work for tagged friend in wall post . Heres the link . https://github.com/nikhilvinnakoti/MyTruckerPro/blob/main/MentionNotifications/ossn_com.php. So I am trying to make changes in mention notifications for wall post. Please have a look at the functions at lines 25,88,107,115,136,155. Please tell me whats wrong here. I implemented the same logic u suggested earlier for wall mentions. I think in function present at line 136 I need to make changes. Iam not clear about annotations. Also I need to add a switch case for wall in function present at line 37.

Replies
in Nik Fury Replied 3 years ago

Hello ZMan and Arshalan Shah. Please give me a chance . Its extremely important feature for me . My company might fire me. Please guys help me. I tried to ask others too. Seems no one understand it. I have some queries regarding debugging and concepts. If you guys feel like helping me, please let me know I will ask.

in Nik Fury Replied 3 years ago

Hello Arsalan and Z-Man. Iam extremely sorry for what I did earlier. Iam trying to learn from you guys. Please help me in this process. Please excuse me for my mistakes. I have been trying to get notfications to work. $notifications->add('mention:post:created', $args['ownerguid'], $args['subjectguid'],$args['item_guid'],$user->guid). I believe $args should be used here.Because $args contains the details of target user.

in King Spider Replied 3 years ago

hi

in Nik Fury Replied 3 years ago

Sorry again! I am new to software domain. Firstly thanks for teaching me to debugging and walking me through code. I know that Iam misunderstanding things. But I believe I can make things right with experience. I should be doing that by now but unfortunately I am uable to do. Please help me here.

German Michael Zülsdorff Replied 3 years ago

Yes, and that's exactly why I feel unable to help you further: because I can see no progress.

Arsalan told you for a good reason to debug $params, and you did and sent that screenshot 2 days ago:
enter image description here


So, does this array contain a owner_guid ? No it doesn't. As it does not contain a subject_guid and no item_guid.
Nevertheless you're trying to call the add function with right these 3 not available parameters.
And that's where my patience ends.

in Nik Fury Replied 3 years ago

I believe its $args instead of $params right? Because those guids are present in $args array right? I tried that too

in Nik Fury Replied 3 years ago

$notifications->add('mention:post:created', $params['ownerguid'], $params['subjectguid'], $params['item_guid'],$user->guid);

German Michael Zülsdorff Replied 3 years ago

You wrote:
I tried with these parameters ownerguid,subjectguid,itemguid.

Please post the complete line of code you tried.

in Nik Fury Replied 3 years ago

The add function has 5 parameters type,posterguid,subjectguid,itemguid,notificationowner. I tried the same in notifications->add. I didnt understand why its not working.

in Nik Fury Replied 3 years ago

Iam extremely sorry Z~Man. I tried with these parameters ownerguid,subjectguid,itemguid.I checked ossnnotifications schema too. So Iam little bit skeptical ...I mean which parameters to use here so that it reaches tagged friend account . Please help me here