Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

14
LINES

< > BotCompany Repo | #1010816 // stefansChat_readHistory_fullMsgs

JavaX fragment (include)

1  
please include function stefansChat_onLine.
2  
3  
// n = max number of lines to get (from most recent)
4  
static L<ChatMsg> stefansChat_readHistory_fullMsgs(int n) {
5  
  int b = stefansChat_onLine_firstRead;
6  
  if (b < 0) b = stefansChat_n();
7  
  int a = max(0, b-n);
8  
  ret stefansChat_readHistory_fullMsgs(a, b);
9  
}
10  
  
11  
static L<ChatMsg> stefansChat_readHistory_fullMsgs(int a, int b) {
12  
  L<Map> msgs = (L) safeUnstruct(loadPage("http://botcompany.de/1008998/raw/msgs-from-to?a=" + a + "&b=" + b));
13  
  ret mapsToObjects(msgs, ChatMsg);
14  
}

Author comment

Began life as a copy of #1010756

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1010816
Snippet name: stefansChat_readHistory_fullMsgs
Eternal ID of this version: #1010816/4
Text MD5: be0fa357b67c8340e04b73408721a2d2
Author: stefan
Category: javax / chat
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-14 21:49:50
Source code size: 535 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 446 / 492
Version history: 3 change(s)
Referenced in: [show references]