Added support for flash messages
This commit is contained in:
+8
-5
@@ -405,13 +405,16 @@ function objToPdu(obj, callback) {
|
||||
|
||||
// If param "short_message" exists, encode it and set parameter "data_coding" accordingly
|
||||
if (obj.params.short_message !== undefined && ! Buffer.isBuffer(obj.params.short_message)) {
|
||||
// Detect encoding
|
||||
obj.params.data_coding = defs.encodings.detect(obj.params.short_message);
|
||||
|
||||
log.silly('larvitsmpp: lib/utils.js: objToPdu() - data_coding "' + obj.params.data_coding + '" detected');
|
||||
// Detect encoding if is not set already
|
||||
if (obj.params.data_coding === undefined) {
|
||||
obj.params.data_coding = defs.encodings.detect(obj.params.short_message);
|
||||
|
||||
// Now set the hex value
|
||||
obj.params.data_coding = defs.consts.ENCODING[obj.params.data_coding];
|
||||
log.silly('larvitsmpp: lib/utils.js: objToPdu() - data_coding "' + obj.params.data_coding + '" detected');
|
||||
|
||||
// Now set the hex value
|
||||
obj.params.data_coding = defs.consts.ENCODING[obj.params.data_coding];
|
||||
}
|
||||
|
||||
// Acutally encode the string
|
||||
shortMsg = obj.params.short_message;
|
||||
|
||||
Reference in New Issue
Block a user