File tree Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -91,16 +91,7 @@ sub send {
91
91
$msg -> {subject } = $msg -> {subject } // " " ;
92
92
$msg -> {text } = $msg -> {text } // " " ;
93
93
94
- my $content = _prepare_content(
95
- $msg ,
96
- attachments => {
97
- send_as => ' attachment' ,
98
- },
99
- tags => {
100
- send_as => ' o:tag' ,
101
- max_num => 3,
102
- },
103
- );
94
+ my $content = _prepare_content($msg );
104
95
105
96
my $r = $self -> {post }-> ($self , ' messages' , $content );
106
97
@@ -109,12 +100,17 @@ sub send {
109
100
return from_json($r -> decoded_content);
110
101
}
111
102
112
- =head2 _prepare_content($msg, %msg_key__options ) : \@content
103
+ =head2 _prepare_content($msg) : \@content
113
104
114
105
Given a $msg hashref, transform it to an arrayref suitable for sending
115
- as multipart/form-data. By default, keys in $msg are copied to the options
116
- arrayref as is. Array keys need to be transformed in a special way, and you
117
- should define them in %msg_key__options.
106
+ as multipart/form-data. The core logic here is that array references are
107
+ modified from:
108
+
109
+ option => [ value1, value2, ... ]
110
+
111
+ to
112
+
113
+ [ option => value1, option => value2, ... ]
118
114
119
115
=cut
120
116
You can’t perform that action at this time.
0 commit comments