XMPPFramework icon indicating copy to clipboard operation
XMPPFramework copied to clipboard

the method: - (XMPPUserCoreDataStorageObject *)myUserForXMPPStream:(XMPPStream *)stream managedObjectContext:(NSMangedObjectContext *)moc is unuseful?

Open jackywpy opened this issue 12 years ago • 5 comments

I call this method to get a XMPPUserCoreDataSorageObject, result is nil; I find this method wants to get myuser from rosters through myJID, but the roster doesn't contain myJID, so, is it unuseful?

jackywpy avatar Jul 15 '14 15:07 jackywpy

I can't see a reason for it myself.

ObjColumnist avatar Jul 15 '14 17:07 ObjColumnist

You can add yourself to roster, and this method should work. I think better implementation will return XMPPUser instance in both cases, even I have myself in roster or not.

vitalyster avatar Jul 15 '14 18:07 vitalyster

@vitalyster @ObjColumnist How to add myself to roster?In logic, myself should not be in roster, right?

jackywpy avatar Jul 16 '14 02:07 jackywpy

@jackywpy as any other contact - send subscription request to your own JID and then approve it

vitalyster avatar Jul 16 '14 05:07 vitalyster

This appears to be blocked by the XMPPFramework:

https://github.com/robbiehanson/XMPPFramework/blob/f8be98f0b2349873d28cbefb9a6f93d3e75328e2/Extensions/Roster/XMPPRoster.m#L479-L489

ObjColumnist avatar Jul 16 '14 09:07 ObjColumnist