Unsuccessful SMS registration should send feedback.

Any communication concerning the SMS module

Moderators: rmvanarkel, hugo, alexandre

Post Reply
Posts: 94
Joined: Tue Sep 18, 2012 3:29 pm

Unsuccessful SMS registration should send feedback.

Post by ken4ward »

Cudos to Cyclos developers. It's been wonderful working with Cyclos and its modules. Extending my knowledge on Cyclos SMS, I have seen that when a member initiates a registration message from his mobile number, ie:
"reg ken4ward 1111 Kehinde Adeoya
If this login name - "ken4ward" was not yet a registered login name, it gets registered and I get a feedback on my phone thus:
"You have been registered with mobile number 08023472436 and login name ken4ward."

My question is this: If the name is already registered and I initiates a registration command thus:
"reg ken4ward 1111 Kehinde Adeoya"

On the monitor I get a it logged thus:
"Handling CommandException [CAN_NOT_REGISTER (501): Error on member registration: The given login name (ken4ward) is already in use]"

All I want at this time is that instead of just logging it, it should be forwarded as an SMS to the to originating mobile number so that the person trying to register will know that he is not registered and be able to know the cause of the failure on his mobile phone. This is because only admins could have an access to the monitor.

My Research so far.....
In the RegisterCommand.java file, in the executeCommand(...., ...., ....){}, when registration fails it is thrown and logged, but when the registration is successful it is handled by ""command." + name + ".response"".
If the registration fails, how am I to handle it to send back feedback to the originating mobile number? Am I to create a new command class? If I am, how do I go about it? Thanks. god bless in Jesus name!
Post Reply