how to add offline user as buddy
Posted: 24 Sep 2008, 08:15
Hi, in our application, we need to add offline user which stored in our database as buddy. We use "requestAddBuddyPermission" on the server side as following:
requestAddBuddyPermission(User sender, target_username, msg);
Offcause the sender is online, but the target_username is offline. The error as following:
=====================
[WARNING]> Exception in ExtensionHandler: java.lang.NullPointerException
Exception type: java.lang.NullPointerException
java.lang.NullPointerException
at it.gotoandplay.smartfoxserver.controllers.SystemHandler.askAddBuddyPermission<SystemHandler.java:3029>
at it.gotoandplay.smartfoxserver.extensions.ExtensionHelper.requestAddBuddyPermission(ExtensionHelper.java:1010)
at it.gotoandplay.extensions.examples.SimpleDbExtension.handleRequest)(SimpleDbExtension.java:3883)
....
======================
Pls give us hand to solve.
Best Regards/
Gu[/img]
requestAddBuddyPermission(User sender, target_username, msg);
Offcause the sender is online, but the target_username is offline. The error as following:
=====================
[WARNING]> Exception in ExtensionHandler: java.lang.NullPointerException
Exception type: java.lang.NullPointerException
java.lang.NullPointerException
at it.gotoandplay.smartfoxserver.controllers.SystemHandler.askAddBuddyPermission<SystemHandler.java:3029>
at it.gotoandplay.smartfoxserver.extensions.ExtensionHelper.requestAddBuddyPermission(ExtensionHelper.java:1010)
at it.gotoandplay.extensions.examples.SimpleDbExtension.handleRequest)(SimpleDbExtension.java:3883)
....
======================
Pls give us hand to solve.
Best Regards/
Gu[/img]