@@ -101,28 +101,32 @@ func pubsubUnsubscriptionStanza(node, jid string) string {
101
101
return pubsubStanza (body )
102
102
}
103
103
104
- func (c * Client ) PubsubSubscribeNode (node , jid string ) {
105
- c .RawInformation (c .jid ,
104
+ func (c * Client ) PubsubSubscribeNode (node , jid string ) error {
105
+ _ , err := c .RawInformation (c .jid ,
106
106
jid ,
107
107
"sub1" ,
108
108
"set" ,
109
109
pubsubSubscriptionStanza (node , c .jid ))
110
+ return err
110
111
}
111
112
112
- func (c * Client ) PubsubUnsubscribeNode (node , jid string ) {
113
- c .RawInformation (c .jid ,
113
+ func (c * Client ) PubsubUnsubscribeNode (node , jid string ) error {
114
+ _ , err := c .RawInformation (c .jid ,
114
115
jid ,
115
116
"unsub1" ,
116
117
"set" ,
117
118
pubsubUnsubscriptionStanza (node , c .jid ))
119
+ return err
118
120
}
119
121
120
- func (c * Client ) PubsubRequestLastItems (node , jid string ) {
122
+ func (c * Client ) PubsubRequestLastItems (node , jid string ) error {
121
123
body := fmt .Sprintf ("<items node='%s'/>" , node )
122
- c .RawInformation (c .jid , jid , "items1" , "get" , pubsubStanza (body ))
124
+ _ , err := c .RawInformation (c .jid , jid , "items1" , "get" , pubsubStanza (body ))
125
+ return err
123
126
}
124
127
125
- func (c * Client ) PubsubRequestItem (node , jid , id string ) {
128
+ func (c * Client ) PubsubRequestItem (node , jid , id string ) error {
126
129
body := fmt .Sprintf ("<items node='%s'><item id='%s'/></items>" , node , id )
127
- c .RawInformation (c .jid , jid , "items3" , "get" , pubsubStanza (body ))
130
+ _ , err := c .RawInformation (c .jid , jid , "items3" , "get" , pubsubStanza (body ))
131
+ return err
128
132
}
0 commit comments