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

15
LINES

< > BotCompany Repo | #1021869 // dm_gazelle_revisitChatLine

JavaX fragment (include)

static L<GazelleTree> dm_gazelle_revisitChatLine(long msgID, O... _) {
  O line = dm_call(dm_gazelle_linesCRUD(), 'lineForID, msgID);
  if (line == null) null;
  long channelID = toLong(call(line, 'channelID));
  L lines = cast dm_call(dm_gazelle_linesCRUD(), 'linesInChannel, channelID);
  int i = indexOf(lines, line);
  if (i < 0) ret null with print("Line not found in channel " + channelID);
  LS preContext = collect text(takeLast(10, takeFirst(i, lines)));
  print("preContext (last first): " + sfu(reversed(preContext)));
  ret gazelle_reason_repeat(
    getString text(line),
    paramsPlus(_, 
      userName := call(line, 'userName),
      +preContext));
}

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, whxojlpjdney

No comments. add comment

Snippet ID: #1021869
Snippet name: dm_gazelle_revisitChatLine
Eternal ID of this version: #1021869/8
Text MD5: d2a44248cf36ab316205fafbf87e8d0d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-19 13:23:21
Source code size: 681 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 250 / 310
Version history: 7 change(s)
Referenced in: [show references]