FurryChat/lib/utils/client_presence_extension.dart

11 lines
328 B
Dart
Raw Normal View History

import 'package:famedlysdk/famedlysdk.dart';
extension ClientPresenceExtension on Client {
2020-06-18 11:39:24 +00:00
static final Map<String, Profile> presencesCache = {};
Future<Profile> requestProfileCached(String senderId) async {
presencesCache[senderId] ??= await getProfileFromUserId(senderId);
return presencesCache[senderId];
}
}