[Building Sakai] get all chat messages for a channel

Matthew Jones matthew at longsight.com
Mon Feb 25 08:30:31 PST 2013


Yea, I didn't notice that until now either as I didn't get to the 100 limit
in testing. :) Even when I got to around 20 test messages I realized that
the performance without batch would be horrible for performance anyway.


On Mon, Feb 25, 2013 at 11:24 AM, Zhen Qian <zqian at umich.edu> wrote:

> Matt:
>
> I can only get 100 messages even after I specify the items param to be
> greater value. This is based on the system-wide setting:
>
> messagesMax at org.sakaiproject.chat2.model.impl.ChatManagerImpl=100
>
> UMich recently filed another jira (SAK-23120) to enable site-wide override
> of this property.
>
> Thanks,
>
> - Zhen
>
>
>
>
> On Mon, Feb 25, 2013 at 11:12 AM, Matthew Jones <matthew at longsight.com>wrote:
>
>> I'm pretty sure the first should work since I'd used it in
>> https://jira.sakaiproject.org/browse/SAK-22191
>>
>> (You can see the example in chatlog.jsp in the commits)
>>
>> However I didn't notice that internally the &items is limited to 10, so
>> this actually doesn't work. I thought about increasing it, but since we
>> disabled batch it has to make a second rest call to get details on the
>> message, which results in a lot of queries.
>>
>> Really what this needs without batch is a custom endpoint that can take
>> an array of message id's to return, rather than just a single value, but we
>> don't have a great pattern for that.
>>
>>
>> On Mon, Feb 25, 2013 at 10:49 AM, Zhen Qian <zqian at umich.edu> wrote:
>>
>>> Hi, all:
>>>
>>> How can I get all the chat messages for a given channel, via the
>>> "/direct" RESTful url?
>>>
>>> I have tried
>>>
>>> https://{server_url}/direct/chat-message?channelId={channel_id}
>>>
>>> and
>>>
>>> https://{server_url}/direct/chat-channel/{channel_id}
>>>
>>> However, the first url returns 0 messages, and the latter returns the
>>> channel entity information.
>>>
>>> Thanks,
>>>
>>> - Zhen
>>>
>>>
>>>
>>> _______________________________________________
>>> sakai-dev mailing list
>>> sakai-dev at collab.sakaiproject.org
>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>
>>> TO UNSUBSCRIBE: send email to
>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>>> "unsubscribe"
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130225/0a5e27ec/attachment.html 


More information about the sakai-dev mailing list