Messages plugin Invalid Recipient issue

Topics related to AppGini plugins/add-ons go here.
Post Reply
User avatar
zibrahim
Veteran Member
Posts: 137
Joined: 2020-01-28 18:30
Location: Malaysia

Messages plugin Invalid Recipient issue

Post by zibrahim » 2022-09-27 07:20

Hi there,
I have installed the Appgini Messages plugin and configured it as instructed in the video.
I can send messages from the Admin to user1 & user2.
However, I could not send the message from user1 to user2 or to Admin.
The "Invalid recipient" message slide from the bottom after clicking the Send button.
SCR-20220927-l9h.png
SCR-20220927-l9h.png (52.54 KiB) Viewed 11216 times
I have done the settings as instructed...
SCR-20220927-kjj.png
SCR-20220927-kjj.png (109.77 KiB) Viewed 11216 times
Is there any setting that I missed out ?
I am using the latest Messages plugin version 1.2 with Appgini 22.14.1293

Appreciate your help. Thanks
Zala.
Appgini 24.10.1579, MacOS 14.3.1 Windows 11 on Parallels.

ozcpa
Posts: 6
Joined: 2022-01-13 00:57

Re: Messages plugin Invalid Recipient issue

Post by ozcpa » 2022-10-27 00:48

Did you ever get a response to this issue? I have exactly the same issue. I am testing using XAMPP on localhost. I have sent a Bug Report to the plugin developer and I am awaiting a reply.

User avatar
zibrahim
Veteran Member
Posts: 137
Joined: 2020-01-28 18:30
Location: Malaysia

Re: Messages plugin Invalid Recipient issue

Post by zibrahim » 2022-10-29 05:15

Hi there,
The AppGini team is still investigating this issue after they managed to reproduced the error.
As a temporary fix, add the group in the canSend method in MessageDB.php file.
The file is located in plugins/messages/app-resources/MessageDB.php
(around line 84)
Just add the group(s) which you want to enable them to send messages under the // admins group always allowed comment.
Sample code below.

Code: Select all

		public static function canSend($recipients = null) {
			static $allowedRecipients = null;
			if($allowedRecipients === null) {
				$mi = getMemberInfo();

				// admins group always allowed
				if($mi['group'] == 'Admins') return true;
				if($mi['group'] == 'Partner') return true;
				if($mi['group'] == 'Lawyer') return true;
				if($mi['group'] == 'Pupil') return true;
				if($mi['group'] == 'Intern') return true;
				if($mi['group'] == 'Account') return true;

				$allowedRecipients = array_merge(
					self::listAllowedRecipients('users'),
					array_map(
						function($g) { return "group:$g"; }, 
						array_keys(self::listAllowedRecipients('groups'))
					)
				);

				if(self::groupPermissions()['canSendGlobalMessage'])
					$allowedRecipients[] = '__ALL_USERS__';
			}
Good luck.
Zala.
Appgini 24.10.1579, MacOS 14.3.1 Windows 11 on Parallels.

User avatar
ronwill
Veteran Member
Posts: 228
Joined: 2015-08-08 10:12
Location: Cheltenham UK +Weatherford USA

Re: Messages plugin Invalid Recipient issue

Post by ronwill » 2023-05-10 17:29

Not working for me!

Have followed the guide but issues with not working when trying to send to group or multiple users via hooks and new record added. Sometimes have managed to get message to a single user (admin) but not the second user (also an admin).

Ron
Ron - Gloucestershire, UK: AppGini Pro V 23.15 Rev 1484 - LOVING IT!
Plugins: Mass Update + Search Page Maker + Summary Reports + Calendar + Messages
Bizzworxx: AppGiniHelper + Inline Detail View
Alejandro Landini: To-Do List + MPI + TV Field Editor
Other: Udemy Course

User avatar
ronwill
Veteran Member
Posts: 228
Joined: 2015-08-08 10:12
Location: Cheltenham UK +Weatherford USA

Re: Messages plugin Invalid Recipient issue

Post by ronwill » 2023-05-10 17:40

Having issue with Messages PlugIn

This does not work

Code: Select all

	'recipients' => [
		'group:accountants',
		'group:sales',
		'jack',
		'dorothy'
	],
I tried my group:customers both with and without named users - my app 'hangs' with no response.

Also

Code: Select all

	/* send the message to all users of the accountants group */
	'recipients' => 'group:accountants',
I changed to group:Admins to suit my app and does not work (I have 2 admins)

Also

Code: Select all

'recipients' => 'jack','dorothy',
Fails - I swapped out to two users in my app and message only goes to first listed user - in the example sends only to Jack !!

Strange, anyone else having issues?
Ron - Gloucestershire, UK: AppGini Pro V 23.15 Rev 1484 - LOVING IT!
Plugins: Mass Update + Search Page Maker + Summary Reports + Calendar + Messages
Bizzworxx: AppGiniHelper + Inline Detail View
Alejandro Landini: To-Do List + MPI + TV Field Editor
Other: Udemy Course

User avatar
crnjak
Veteran Member
Posts: 37
Joined: 2021-12-29 20:25

Re: Messages plugin Invalid Recipient issue

Post by crnjak » 2023-05-18 11:27

I have now same issue. How to fix this?

xbox2007
Veteran Member
Posts: 129
Joined: 2016-12-16 16:49

Re: Messages plugin Invalid Recipient issue

Post by xbox2007 » 2023-05-24 16:26

hello
me also have same problem , i send message for support but nobody care to answer !!!!!

User avatar
a.gneady
Site Admin
Posts: 1280
Joined: 2012-09-27 14:46
Contact:

Re: Messages plugin Invalid Recipient issue

Post by a.gneady » 2023-05-26 15:21

I'm aware of the issue and working on a fix for it that we'll release as soon as possible.
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

User avatar
a.gneady
Site Admin
Posts: 1280
Joined: 2012-09-27 14:46
Contact:

Re: Messages plugin Invalid Recipient issue

Post by a.gneady » 2023-05-27 18:50

I'm pleased to announce a new release of the Messages plugin (v 1.3) that fixes this issue and a couple more. Please download it and let me know your feedback :)
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

User avatar
zibrahim
Veteran Member
Posts: 137
Joined: 2020-01-28 18:30
Location: Malaysia

Re: Messages plugin Invalid Recipient issue

Post by zibrahim » 2023-05-30 01:25

Hi there,
I have tested the latest version and so far so good. Messages could be sent and received across groups.

However, I found and issue with the insertion of the message icon code during installation to hooks/header-extras.php ...
The issue is the php tag was missing during insertion.
SCR-20230530-ioqu.png
SCR-20230530-ioqu.png (30.9 KiB) Viewed 10586 times
which caused
SCR-20230530-ioih.png
SCR-20230530-ioih.png (35.82 KiB) Viewed 10586 times
Also it would be nice if insertion comment is included like other plugins
SCR-20230530-irwd.png
SCR-20230530-irwd.png (35.02 KiB) Viewed 10586 times
Anyway, thank you for the update and hope it can be fixed soon.
Zala.
Appgini 24.10.1579, MacOS 14.3.1 Windows 11 on Parallels.

User avatar
a.gneady
Site Admin
Posts: 1280
Joined: 2012-09-27 14:46
Contact:

Re: Messages plugin Invalid Recipient issue

Post by a.gneady » 2023-05-30 10:59

However, I found and issue with the insertion of the message icon code during installation to hooks/header-extras.php ...
The issue is the php tag was missing during insertion.
If the header-extras.php file already includes PHP code, it could confuse the plugin, appending the include line without opening a PHP tag first since it's appending to an already open PHP tag .. I'll investigate this further and see how to fix it.
Also it would be nice if insertion comment is included like other plugins
Thanks for your suggestion. Will do this in the next release.
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

Post Reply