import Payload from './Payload' ; import { Thrift , TCompactProtocol } from 'thrift' ; export default class ThreadKeyPayload extends Payload { threadId : string ; threadType : number ; constructor ( threadId , threadType ) { super ( ) ; this . threadId = threadId . toString ( ) ; this . threadType = threadType ; } encode ( proto ) { proto . writeFieldBegin ( 'threadId' , Thrift . Type . STRING , 1 ) ; proto . writeString ( this . threadId ) ; proto . writeFieldBegin ( 'threadType' , Thrift . Type . I32 , 2 ) ; proto . writeI64 ( this . threadType ) ; proto . writeByte ( 0 ) ; return null ; } getTopic ( ) { return null ; } }