Closed Bu88le closed 6 years ago
Upon trying to implement FriendRequests
I found a essential change that has to be made with the next commit:
As from the next commit on the client will send the server a SendableRequest
of the type ERequestType.FRIEND
(a new type)! This on the one sounds much more logical and gives us the option to directly send profiles should we need it at a later point.
Seems logical, but that way you cannot add a short text to your friend request. I'm interested to see how you will work around that. But feel free to adjust the API. We'll work something out.
According to the JavaDoc commentary of the SendableRequest.java class we know the following: `/**
* Depending on the type of request the purpose of the universal string field differs:
* <ul>
* <li>For profile requests the string field specifies the profile that is/are requested. It resembles a whole
* username or any substring of a username. It is only taken into account if the uuid field is null!</li>
* <li>For delete account and contacts/settings requests the string field is not used.</li>
* </ul>
*
* @return the request's universalString field. For usage details see description above.
* @see ERequestType
*/
public String getUniversalString() {
return universalString;
}`
That means we could use the universalString for adding short messages to your friend request because according to the code the string is stored in the database as a Varchar of length 256 which is, at least in my eyes, enough for a short message.
The method
protected void UUID getUuid()
will recieve with the next commit the modifierpublic
in order to make the method usable in the client's classWriteToDatabase
.If this happens to create a conflict in the server's code, please comment below this issue.