File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ import toggleMobilePushSettings from './settings/toggleMobilePushSettings';
40
40
import createStream from './streams/createStream' ;
41
41
import getStreams from './streams/getStreams' ;
42
42
import updateStream from './streams/updateStream' ;
43
+ import sendSubmessage from './submessages/sendSubmessage' ;
43
44
import getSubscriptions from './subscriptions/getSubscriptions' ;
44
45
import subscriptionAdd from './subscriptions/subscriptionAdd' ;
45
46
import subscriptionRemove from './subscriptions/subscriptionRemove' ;
@@ -86,6 +87,7 @@ export {
86
87
createStream ,
87
88
getStreams ,
88
89
updateStream ,
90
+ sendSubmessage ,
89
91
getSubscriptions ,
90
92
setTopicMute ,
91
93
subscriptionAdd ,
Original file line number Diff line number Diff line change
1
+ /* @flow strict-local */
2
+
3
+ import type { ApiResponse , Auth } from '../transportTypes' ;
4
+ import { apiPost } from '../apiFetch' ;
5
+
6
+ /** See https://zulip.readthedocs.io/en/latest/subsystems/widgets.html#poll-todo-lists-and-games */
7
+ // `msg_type` only exists as widget at the moment, see #3205.
8
+ export default async ( auth : Auth , messageId : number , content : string ) : Promise < ApiResponse > =>
9
+ apiPost ( auth , 'submessage' , {
10
+ message_id : messageId ,
11
+ msg_type : 'widget' ,
12
+ content,
13
+ } ) ;
You can’t perform that action at this time.
0 commit comments