Skip to content

Commit

Permalink
Fix iOS push message bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
wubenqi committed Dec 25, 2018
1 parent a9532eb commit fb50b89
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
5 changes: 4 additions & 1 deletion access/session/server/check_api_request_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,10 @@ func getSessionType2(object mtproto.TLObject, sessionType *int) {
*sessionType = kSessionGeneric

case *mtproto.TLInvokeWithoutUpdates:
// ignore
// TODO(@benqi): move TLInvokeWithoutUpdates etc to parsed_manually_types.
dbuf := mtproto.NewDecodeBuf(object.(*mtproto.TLInvokeWithoutUpdates).Query)
q := dbuf.Object()
getSessionType2(q, sessionType)

//////////////////////////////////////////////////////////////
case *mtproto.TLUploadGetCdnFile,
Expand Down
24 changes: 24 additions & 0 deletions access/session/server/check_api_request_type_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright (c) 2018-present, NebulaChat Studio (https://nebula.chat).
// All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Author: Benqi (wubenqi@gmail.com)

package server

import "testing"

func TestGetSessionType2(t *testing.T) {

}

0 comments on commit fb50b89

Please sign in to comment.