replyEntry method

Future<int> replyEntry(
  1. String shortLink,
  2. String replyText,
  3. String ppShortLink,
  4. String attachmentType,
  5. String _xxHash,
  6. String _blurHash,
  7. int attachmentLength,
)

Implementation

Future<int> replyEntry(
    String shortLink,
    String replyText,
    String ppShortLink,
    String attachmentType,
    String _xxHash,
    String _blurHash,
    int attachmentLength) async {
  if (homeSite == null) return -1;
  return homeSite!
      .newReplyToQueue(replyText, shortLink, ppShortLink, Uint8List(0),
          attachmentType, nick, avatar, _xxHash, _blurHash, attachmentLength)
      .then((value) {
    //if (value > -1) {
    _tbsCache.remove(shortLink);
    //}
    return value;
  });

  /*ModeratorEntry? target = findModeratorEntryByShortLink(shortLink);
  if (target == null) return -1;
  final surl = target.siteUrl.isNotEmpty ? target.siteUrl : _homeSite;

  return _sites[surl]!
      .newReplyToQueue(replyText, target.shortLink, ppShortLink, attachement,
          attachmentType, nick, avatar, _xxHash)
      .then((value) {
    if (value > -1) {
      _tbsCache.remove(shortLink);
    }
    return value;
  });*/
}