Skip to content

Commit

Permalink
Merge pull request LucasGGamerM#491 from mishnz/master
Browse files Browse the repository at this point in the history
Second fix for MIME64 inconsistency in serverKey.
  • Loading branch information
grishka authored Jan 2, 2023
2 parents 525cc69 + faf5e8e commit 60517b0
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ public void registerAccountForPush(PushSubscription subscription){
@Override
public void onSuccess(PushSubscription result){
MastodonAPIController.runInBackground(()->{
serverKey=deserializeRawPublicKey(Base64.decode(result.serverKey, Base64.DEFAULT));
result.serverKey=result.serverKey.replace('/','_');
result.serverKey=result.serverKey.replace('+','-');
serverKey=deserializeRawPublicKey(Base64.decode(result.serverKey, Base64.URL_SAFE));

AccountSession session=AccountSessionManager.getInstance().tryGetAccount(accountID);
if(session==null)
Expand Down

0 comments on commit 60517b0

Please sign in to comment.