You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deleting posts in a multi-tenant environment needs a different ID. #294
Looks like there is an issue with deleting posts in the multi-tenant environment
16:49 bernhard If I use the short id it does not work
16:49 bernhard 3:::{"type":0,"data":["xmpp.buddycloud.item.delete",{"node":"/user/test1@laos.buddycloud.com/posts","id":"13900949-d14a-40b6-aacf-3a6dc94d01a9"}],"id":8}
16:49 bernhard if I use the long id I'm able to delete
16:49 bernhard 3:::{"type":0,"data":["xmpp.buddycloud.item.delete",{"node":"/user/test1@laos.buddycloud.com/posts","id":"tag:null@cs.buddycloud.com,/user/test1@laos.buddyc…ud.com/posts,323730c2-66ba-4355-971c-452788da185b"}],"id":7}
My implementation works but I don't really know when to use the long and when to use the short id. The documentation does not tell anything about short and long id's.
Reply for example uses the short id:
3:::{"type":0,"data":["xmpp.buddycloud.publish",{"node":"/user/laos@laos.buddycloud.com/posts","content":{"atom":{"content":"test"},"in-reply-to":{"ref":"aabef1cc-38fc-4077-a2f4-777ba164956b"}}}],"id":23}
Thanks @robotnic, I do need to know the error you are getting back when using the short I'd though?
In general you should always use the long I
ID but for backwards compatibility we accept the short ID everywhere too (it should just handle it - obviously not quite everywhere though!).
If you Google "buddycloud xep" you should find a schema although I'm not sure how much it goes into ID usage.
Believe it or not that's a good thing in some ways. This means your error is a NullPointerException and not an IllegalArgumentException. So next I need to look at why we are getting these.
Activity
lloydwatkin commentedon Mar 16, 2015
Was about to take a look at this but without the error I'm unable to see where thing might be going wrong. Do you have/can you get the error message?
robotnic commentedon Mar 16, 2015
The id is the problem.
To delete an item I have to use the "long" id:
3:::{"type":0,"data":["xmpp.buddycloud.item.delete",{"node":"/user/maria@laos.buddycloud.com/posts","id":"tag:null@cs.buddycloud.com,/user/maria@laos.buddycloud.com/posts,a8bb6fff-01fc-4618-a6df-6fd3b9fd2881"}],"id":14}
My implementation works but I don't really know when to use the long and when to use the short id. The documentation does not tell anything about short and long id's.
Reply for example uses the short id:
3:::{"type":0,"data":["xmpp.buddycloud.publish",{"node":"/user/laos@laos.buddycloud.com/posts","content":{"atom":{"content":"test"},"in-reply-to":{"ref":"aabef1cc-38fc-4077-a2f4-777ba164956b"}}}],"id":23}
Maybe there is a shema, but I don't see it.
lloydwatkin commentedon Mar 16, 2015
Thanks @robotnic, I do need to know the error you are getting back when using the short I'd though?
In general you should always use the long I
ID but for backwards compatibility we accept the short ID everywhere too (it should just handle it - obviously not quite everywhere though!).
If you Google "buddycloud xep" you should find a schema although I'm not sure how much it goes into ID usage.
robotnic commentedon Mar 17, 2015
Delete request with short id
3:::{"type":0,"data":["xmpp.buddycloud.item.delete",{"node":"/user/test1@laos.buddycloud.com/posts","id":"ebcc46bc-f53f-439d-af3a-a3064c343662"}],"id":11}
Response
3:::{"id":11,"type":1,"data":[{"type":"modify","condition":"bad-request"},null]}
lloydwatkin commentedon Mar 17, 2015
Thanks, will take a look next time I get a chance.
lloydwatkin commentedon Mar 20, 2015
@robotnic once @imaginator confirms #299 is deployed can you repeat your test please and post the results.
robotnic commentedon Mar 20, 2015
I can't see a diffence
Long
3:::{"type":0,"data":["xmpp.buddycloud.item.delete",{"node":"/user/test1@laos.buddycloud.com/posts","id":"tag:null@cs.buddycloud.com,/user/test1@laos.buddycloud.com/posts,495fc6e9-49ef-4d6d-83ce-278ef71e3a69"}],"id":11}
3:::{"id":11,"type":1,"data":[null,true]}
short
3:::{"type":0,"data":["xmpp.buddycloud.item.delete",{"node":"/user/test1@laos.buddycloud.com/posts","id":"e0674bf2-7200-4359-98b9-253c79a4eea2"}],"id":11}
3:::{"id":11,"type":1,"data":[{"type":"modify","condition":"bad-request"},null]}
lloydwatkin commentedon Mar 20, 2015
Believe it or not that's a good thing in some ways. This means your error is a NullPointerException and not an IllegalArgumentException. So next I need to look at why we are getting these.