Fees and structures added
This commit is contained in:
@@ -42,6 +42,14 @@ public class SessionService {
|
||||
userStates.put(phoneNumber, state);
|
||||
}
|
||||
|
||||
public boolean isSessionCached(String phoneNumber) {
|
||||
return sessionTokens.containsKey(phoneNumber);
|
||||
}
|
||||
|
||||
public boolean hasSavedCredentials(String phoneNumber) {
|
||||
return userRepository.existsById(phoneNumber);
|
||||
}
|
||||
|
||||
public void resetState(String phoneNumber) {
|
||||
userStates.remove(phoneNumber);
|
||||
}
|
||||
@@ -104,6 +112,20 @@ public class SessionService {
|
||||
return name;
|
||||
}
|
||||
|
||||
private final Map<String, Map<String, String>> receiptIdMappings = new ConcurrentHashMap<>();
|
||||
|
||||
public void storeReceiptIdMappings(String phoneNumber, Map<String, String> mappings) {
|
||||
receiptIdMappings.put(phoneNumber, mappings);
|
||||
}
|
||||
|
||||
public String getReceiptIdMapping(String phoneNumber, String shortId) {
|
||||
Map<String, String> mappings = receiptIdMappings.get(phoneNumber);
|
||||
if (mappings != null) {
|
||||
return mappings.get(shortId);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setTempLoginId(String phoneNumber, String tempId) {
|
||||
temporaryLoginIds.put(phoneNumber, tempId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user